0

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 ?

midikko
  • 146
  • 11

2 Answers2

0

That was driver developers issue.

midikko
  • 146
  • 11
  • 1
    can you elaborate? – Robert Apr 25 '16 at 09:59
  • @Robert When i posted this question, i don't understand the main work principles of JAVA-POS and think, that i do something wrong. but later i decompiled driver, and saw that there is some mistakes in driver itself, so update question. or i should delete it in this case? – midikko Apr 25 '16 at 10:07
-1

Try the method:

setEnabled(true);

before or after claim

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
  • 1
    Welcome to StackOverflow. It's recommended to take [tour](http://stackoverflow.com/tour) and read [How do I write a good answer?](http://stackoverflow.com/help/how-to-answer) – Shashanth Oct 16 '16 at 05:48