Search code examples
javajavaposfiscal

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 ?


Solution

  • That was driver developers issue.