简体   繁体   中英

Java Pos FiscalPrinter

How correctly print receipts in Java POS? I try to make module in java, that will work with fiscal registrar PIRIT K.

I get some troubles:

Sell.

FiscalPrinter printer = new FiscalPrinter();
printer.open("PIRIT");
printer.claim(1);
printer.beginFiscalReceipt(true);
printer.printRecItem(premadeString("Test"), 2, 1 * 1000, 2, 1, premadeString("Test"));
printer.printRecTotal(2, 100, "0");
printer.printRecVoid("Close check");

It's wont print VAT values after total. But Vat table in registrar is ok.

Refund:

FiscalPrinter printer = new FiscalPrinter();
printer.open("PIRIT");
printer.claim(1);
printer.setFiscalReceiptType(FPTR_RT_REFUND); 
printer.beginFiscalReceipt(true);
printer.printRecRefund("Тестовый возврат", 1, 2);
printer.printRecVoid("Close Check");

It's simple give me exception "error value of station". In what state printer should be for refund? And yes, printRecIntemRefund not supported by driver.

I use printRecVoid(); for see output and not keep my operation in fiscal memory.

How can i fix it? Somebody already faced with similar problems ?

那是驱动程序开发人员的问题。

Try the method:

setEnabled(true);

before or after claim

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM