1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// use fiscalprinter::{FiscalPrinter, Setup, PrinterResult, Report, Document, DocumentAction, SetupAction, ReportAction};
// pub struct PnPTest {
// }
// impl FiscalPrinter for PnPTest {
// fn new() -> Self {
// PnPTest { }
// }
// fn open_port(&self, _port: String) -> bool {
// println!("open_port {:?}" , _port);
// let hola = true;
// return hola;
// }
// fn send_command(&self, _command: String) -> bool {
// println!("send_command {:?}" , _command);
// let hola = true;
// return hola;
// }
// fn close_port(&self) -> bool {
// println!("close_port");
// let hola = true;
// return hola;
// }
// fn setup(&self, _setup: Setup) -> PrinterResult {
// println!("setup");
// PrinterResult {
// uuid: _setup.get_uuid(),
// printer_name: _setup.get_printer_name(),
// last_invoice_no: String::new(),
// last_credit_memo_no: String::new(),
// last_debit_memo_no: String::new(),
// last_non_fiscal_no: String::from("Last Non fiscal No"),
// last_closing_no: String::new()
// }
// }
// fn print_report(&self, _report: Report) -> PrinterResult {
// println!("print_report");
// PrinterResult {
// uuid: _report.get_uuid(),
// printer_name: _report.get_printer_name(),
// last_invoice_no: String::new(),
// last_credit_memo_no: String::from("Last Credit Memo No"),
// last_debit_memo_no: String::new(),
// last_non_fiscal_no: String::new(),
// last_closing_no: String::new()
// }
// }
// fn print_document(&self, _document: Document) -> PrinterResult {
// println!("print_document");
// PrinterResult {
// uuid: _document.get_uuid(),
// printer_name: _document.get_printer_name(),
// last_invoice_no: String::new(),
// last_credit_memo_no: String::new(),
// last_debit_memo_no: String::from("Last Debit Memo No"),
// last_non_fiscal_no: String::new(),
// last_closing_no: String::new()
// }
// }
// }