Search code examples
c#printingopos

How to open Day in Fiscal Printer by OPOS


How to open Day in Fiscal Printer by OPOS?

My code is not working...

device = new OPOSFiscalPrinterClass();

device.Open("FiscPrinter");  //Opened succes
device.ClaimDevice(1000);    //Claimed success
device.DeviceEnabled = true; //Enabled success

if (device.DayOpened)
{
   device.PrintZReport();
}

device.FiscalReceiptType = (int)OPOSFiscalPrinterConstants.FPTR_RT_SALES;

device.BeginFiscalReceipt(true); //After that: ResultCode=114, ResultCodeExtended=221, PrinterState=2, DayOpened=false

device.PrintRecItem("Milk", 25.00M, 10000, 0, 25.00M, "");  
device.EndFiscalReceipt(false); //After that: Receipt cannot be closed, ResultCode=114, ResultCodeExtended=207

device.Release();
device.Close();

Trying with UnifiedPOS documentation. What wrong?


Solution

  • Okey, the Fiscal Printer have to have an Operator/User, after that you can use BeginFiscalReceipt, for example.