Interface FiscalPrinterInterface
- All Superinterfaces:
JposBaseInterface
- All Known Implementing Classes:
FiscalPrinterProperties
Interface for methods that implement property setter and method calls for the FiscalPrinter device category.
For details about properties, methods and method parameters, see UPOS specification, chapter Fiscal Printer.
Further details about error handling can be found in introduction - Device Behavior Models - Errors.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
additionalHeader(String header)
Final part of setting AdditionalHeader.void
additionalTrailer(String trailer)
Final part of setting AdditionalTrailer.void
beginFiscalDocument(int documentAmount)
Final part of BeginFiscalDocument method.void
beginFiscalReceipt(boolean printHeader)
Final part of BeginFiscalReceipt method.void
beginFixedOutput(int station, int documentType)
Final part of BeginFixedOutput method.void
beginInsertion(int timeout)
Final part of BeginInsertion method.void
beginItemList(int vatID)
Final part of BeginItemList method.void
Final part of BeginNonFiscal method.void
beginRemoval(int timeout)
Final part of BeginRemoval method.void
Final part of BeginTraining method.void
Final part of setting ChangeDue.void
checkTotal(boolean check)
Final part of setting CheckTotal.void
Final part of ClearError method.void
contractorId(int id)
Final part of setting ContractorId.void
dateType(int type)
Final part of setting DateType.void
duplicateReceipt(boolean yes)
Final part of setting DuplicateReceipt.void
Final part of EndFiscalDocument method.void
endFiscalReceipt(boolean printHeader)
Final part of EndFiscalReceipt method.void
Final part of EndFixedOutput method.void
Final part of EndInsertion method.void
Final part of EndItemList method.void
Final part of EndNonFiscal method.void
Final part of EndRemoval method.void
Final part of EndTraining method.void
fiscalReceiptStation(int station)
Final part of setting FiscalReceiptStation.void
fiscalReceiptType(int type)
Final part of setting FiscalReceiptType.void
getData(int dataItem, int[] optArgs, int[] data)
Final part of GetData method for counters, numbers and lengths.void
getData(int dataItem, int[] optArgs, long[] data)
Final part of GetData method for totalizers.void
Final part of GetData method.void
Final part of GetDate method.void
getTotalizer(int vatID, int optArgs, long[] data)
Final part of GetTotalizer method.void
getTotalizer(int vatID, int optArgs, String[] data)
Deprecated.void
getVatEntry(int vatID, int optArgs, int[] vatRate)
Final part of GetVatEntry method.void
messageType(int type)
Final part of setting MessageType.void
Final part of setting PostLine.void
Final part of setting PreLine.void
Final part of PrintDuplicateReceipt method.void
Final part of PrintFiscalDocumentLine method.printFiscalDocumentLine(String documentLine)
Validation part of PrintFiscalDocumentLine method.printFixedOutput(int documentType, int lineNumber, String data)
Validation part of PrintFixedOutput method.void
printFixedOutput(PrintFixedOutput request)
Final part of PrintFixedOutput method.printNormal(int station, String data)
Validation part of PrintNormal method.void
printNormal(PrintNormal request)
Final part of PrintNormal method.void
printPeriodicTotalsReport(String date1, String date2)
Final part of PrintPeriodicTotalsReport method.void
Final part of PrintPowerLossReport method.printRecCash(long amount)
Validation part of PrintRecCash method.void
printRecCash(PrintRecCash request)
Final part of PrintRecCash method.void
printRecItem(PrintRecItem request)
Final part of PrintRecItem method.printRecItem(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName)
Validation part of PrintRecItem method.printRecItemAdjustment(int adjustmentType, String description, long amount, int vatInfo)
Validation part of PrintRecItemAdjustment method.void
printRecItemAdjustment(PrintRecItemAdjustment request)
Final part of PrintRecItemAdjustment method.printRecItemAdjustmentVoid(int adjustmentType, String description, long amount, int vatInfo)
Validation part of PrintRecItemAdjustmentVoid method.void
Final part of PrintRecItemAdjustmentVoid method.void
printRecItemFuel(PrintRecItemFuel request)
Final part of PrintRecItemFuel method.printRecItemFuel(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName, long specialTax, String specialTaxName)
Validation part of PrintRecItemFuel method.void
printRecItemFuelVoid(PrintRecItemFuelVoid request)
Final part of PrintRecItemFuelVoid method.printRecItemFuelVoid(String description, long price, int vatInfo, long specialTax)
Validation part of PrintRecItemFuelVoid method.void
printRecItemRefund(PrintRecItemRefund request)
Final part of PrintRecItemRefund method.printRecItemRefund(String description, long amount, int quantity, int vatInfo, long unitAmount, String unitName)
Validation part of PrintRecItemRefund method.void
printRecItemRefundVoid(PrintRecItemRefundVoid request)
Final part of PrintRecItemRefundVoid method.printRecItemRefundVoid(String description, long amount, int quantity, int vatInfo, long unitAmount, String unitName)
Validation part of PrintRecItemRefundVoid method.void
printRecItemVoid(PrintRecItemVoid request)
Final part of PrintRecItemVoid method.printRecItemVoid(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName)
Validation part of PrintRecItemVoid method.void
printRecMessage(PrintRecMessage request)
Final part of PrintRecMessage method.printRecMessage(String message)
Validation part of PrintRecMessage method.void
printRecNotPaid(PrintRecNotPaid request)
Final part of PrintRecNotPaid method.printRecNotPaid(String description, long amount)
Validation part of PrintRecNotPaid method.printRecPackageAdjustment(int adjustmentType, String description, String vatAdjustment)
Deprecated.printRecPackageAdjustment(int adjustmentType, String description, String vatAdjustment, Map<Integer,Number> parsedAdjustments)
Validation part of PrintRecPackageAdjustment method.void
Final part of PrintRecPackageAdjustment method.printRecPackageAdjustVoid(int adjustmentType, String vatAdjustment)
Deprecated.printRecPackageAdjustVoid(int adjustmentType, String vatAdjustment, Map<Integer,Number> parsedAdjustments)
Validation part of PrintRecPackageAdjustVoid method.void
Final part of PrintRecPackageAdjustVoid method.void
printRecRefund(PrintRecRefund request)
Final part of PrintRecRefund method.printRecRefund(String description, long amount, int vatInfo)
Validation part of PrintRecRefund method.void
printRecRefundVoid(PrintRecRefundVoid request)
Final part of PrintRecRefundVoid method.printRecRefundVoid(String description, long amount, int vatInfo)
Validation part of PrintRecRefundVoid method.printRecSubtotal(long amount)
Validation part of PrintRecSubtotal method.void
printRecSubtotal(PrintRecSubtotal request)
Final part of PrintRecSubtotal method.printRecSubtotalAdjustment(int adjustmentType, String description, long amount)
Validation part of PrintRecSubtotalAdjustment method.void
Final part of PrintRecSubtotalAdjustment method.printRecSubtotalAdjustVoid(int adjustmentType, long amount)
Validation part of PrintRecSubtotalAdjustVoid method.void
Final part of PrintRecSubtotalAdjustVoid method.void
printRecTaxID(PrintRecTaxID request)
Final part of PrintRecTaxID method.printRecTaxID(String taxId)
Validation part of PrintRecTaxID method.printRecTotal(long total, long payment, String description)
Validation part of PrintRecTotal method.void
printRecTotal(PrintRecTotal request)
Final part of PrintRecTotal method.void
printRecVoid(PrintRecVoid request)
Final part of PrintRecVoid method.printRecVoid(String description)
Validation part of PrintRecVoid method.void
printRecVoidItem(PrintRecVoidItem request)
Final part of PrintRecVoidItem method.printRecVoidItem(String description, long price, int quantity, int adjustmentType, long adjustment, int vatInfo)
Validation part of PrintRecVoidItem method.void
printReport(int reportType, String startNum, String endNum)
Final part of PrintReport method.void
Final part of PrintXReport method.void
Final part of PrintZReport method.void
Final part of ResetPrinter method.void
setCurrency(int newCurrency)
Final part of SetCurrency method.void
Final part of SetDate method.void
setHeaderLine(int lineNumber, String text, boolean doubleWidth)
Final part of SetHeaderLine method.void
Final part of SetPOSID method.void
setStoreFiscalID(String ID)
Final part of SetStoreFiscalID method.void
setTrailerLine(int lineNumber, String text, boolean doubleWidth)
Final part of SetTrailerLine method.void
Final part of SetVatTable method.void
setVatValue(int vatID, int optArgs, int vatValue)
Final part of SetVatValue method.void
setVatValue(int vatID, long vatValue)
Final part of SetVatValue method.void
slipSelection(int type)
Final part of setting SlipSelection.void
totalizerType(int type)
Final part of setting TotalizerType.void
verifyItem(String itemName, int vatID)
Final part of VerifyItem method.Methods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Method Details
-
additionalHeader
Final part of setting AdditionalHeader. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapAdditionalHeader is true.
- Parameters:
header
- Additional header line to be printer in header of next receipt.- Throws:
jpos.JposException
- If an error occurs.
-
additionalTrailer
Final part of setting AdditionalTrailer. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapAdditionalTrailer is true.
- Parameters:
trailer
- Additional header line to be printer in header of next receipt.- Throws:
jpos.JposException
- If an error occurs.
-
changeDue
Final part of setting ChangeDue. Must be overwritten within derived classes, if CapChangeDue is true. This method will be called only if the following plausibility checks lead to a positive result:- Device is opened,
- CapChangeDue is true,
- internal property AllowAlwaysSetProperties is true or changeDue equals the previous value of ChangeDue.
- Parameters:
changeDue
- Text for cash return.- Throws:
jpos.JposException
- If an error occurs.
-
checkTotal
void checkTotal(boolean check) throws jpos.JposExceptionFinal part of setting CheckTotal. Can be overwritten within derived classes, if CapCheckTotal is true. This method will be called only if the following plausibility checks lead to a positive result:- Device is opened,
- CapCheckTotal is true,
- internal property AllowAlwaysSetProperties is true or check equals the previous value of CheckTotal.
- Parameters:
check
- true if application and printer total must match, false otherwise.- Throws:
jpos.JposException
- If an error occurs.
-
contractorId
void contractorId(int id) throws jpos.JposExceptionFinal part of setting ContractorId. Can be overwritten within derived classes, if CapMultiContractor is true. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapMultiContractor is true,
- id is one of CID_FIRST, CID_SECOND or CID_SINGLE,
- internal property AllowAlwaysSetProperties is true or id equals the previous value of ContractorId.
- Parameters:
id
- One of CID_FIRST, CID_SECOND or CID_SINGLE.- Throws:
jpos.JposException
- If an error occurs.
-
dateType
void dateType(int type) throws jpos.JposExceptionFinal part of setting DateType. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- type is one of DT_CONF, DT_EOD, DT_RESET, DT_RTC, DT_VAT, DT_START, DT_TICKET_START or DT_TICKET_END,
- internal property AllowAlwaysSetProperties is true or type equals the previous value of DateType.
- Parameters:
type
- One of DT_CONF, DT_EOD, DT_RESET, DT_RTC, DT_VAT or DT_START.- Throws:
jpos.JposException
- If an error occurs.
-
duplicateReceipt
void duplicateReceipt(boolean yes) throws jpos.JposExceptionFinal part of setting DuplicateReceipt. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- CapDuplicateReceipt is true,
- internal property AllowAlwaysSetProperties is true or yes equals the previous value of DuplicateReceipt.
- Parameters:
yes
- true if service can store printer commands for generation of fiscal receipt duplication.- Throws:
jpos.JposException
- If an error occurs.
-
fiscalReceiptStation
void fiscalReceiptStation(int station) throws jpos.JposExceptionFinal part of setting FiscalReceiptStation. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- CapFiscalReceiptStation is true,
- Printer is in monitoring state,
- station is one of RS_RECEIPT or RS_SLIP.
- if CapSlpPresent is false, station is RS_RECEIPT,
- internal property AllowAlwaysSetProperties is true or station equals the previous value of FiscalReceiptStation.
- Parameters:
station
- One of RS_RECEIPT or RS_SLIP.- Throws:
jpos.JposException
- If an error occurs.
-
fiscalReceiptType
void fiscalReceiptType(int type) throws jpos.JposExceptionFinal part of setting FiscalReceiptType. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- CapFiscalReceiptType is true,
- Printer is in monitoring state,
- type is one of RT_CASH_IN, RT_CASH_OUT, RT_GENERIC, RT_SALES, RT_SERVICE, SIMPLE_INVOICE or RT_REFUND,
- internal property AllowAlwaysSetProperties is true or type equals the previous value of FiscalReceiptType.
- Parameters:
type
- One of RT_CASH_IN, RT_CASH_OUT, RT_GENERIC, RT_SALES, RT_SERVICE, SIMPLE_INVOICE or RT_REFUND.- Throws:
jpos.JposException
- If an error occurs.
-
messageType
void messageType(int type) throws jpos.JposExceptionFinal part of setting MessageType. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- type is one of the values listed in the UPOS specification for property MessageType,
- internal property AllowAlwaysSetProperties is true or type equals the previous value of MessageType.
- Parameters:
type
- One of the values listed in the UPOS specification for property MessageType.- Throws:
jpos.JposException
- If an error occurs.
-
postLine
Final part of setting PostLine. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPostPreLine is true,
- Printer is in fiscal receipt state.
- Parameters:
text
- Text to be printed after next item line.- Throws:
jpos.JposException
- If an error occurs.
-
preLine
Final part of setting PreLine. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPostPreLine is true,
- Printer is in fiscal receipt state.
- Parameters:
text
- Text to be printed before next item line.- Throws:
jpos.JposException
- If an error occurs.
-
slipSelection
void slipSelection(int type) throws jpos.JposExceptionFinal part of setting SlipSelection. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpPresent is true,
- type is one of SS_FULL_LENGTH or SS_VALIDATION.
- If CapSlpValidation is false, type is SS_FULL_LENGTH.
- Parameters:
type
- One of SS_FULL_LENGTH or SS_VALIDATION.- Throws:
jpos.JposException
- If an error occurs.
-
totalizerType
void totalizerType(int type) throws jpos.JposExceptionFinal part of setting TotalizerType. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapTotalizerType is true,
- type is one of TT_DOCUMENT, TT_DAY, TT_RECEIPT or TT_GRAND.
- Parameters:
type
- One of TT_DOCUMENT, TT_DAY, TT_RECEIPT or TT_GRAND.- Throws:
jpos.JposException
- If an error occurs.
-
beginFiscalDocument
void beginFiscalDocument(int documentAmount) throws jpos.JposExceptionFinal part of BeginFiscalDocument method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpPresent as well as CapSlpFiscalDocument is true,
- PrinterState is PS_MONITOR (not in any other kind of document).
- Parameters:
documentAmount
- Amount of document to be stored by the Fiscal Printer.- Throws:
jpos.JposException
- If an error occurs.
-
beginFiscalReceipt
void beginFiscalReceipt(boolean printHeader) throws jpos.JposExceptionFinal part of BeginFiscalReceipt method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_MONITOR (not in any other kind of document).
- Parameters:
printHeader
- Indicates if the header lines are to be printed at this time.- Throws:
jpos.JposException
- If an error occurs.
-
beginFixedOutput
void beginFixedOutput(int station, int documentType) throws jpos.JposExceptionFinal part of BeginFixedOutput method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapFixedOutput is true,
- PrinterState is PS_MONITOR (not in any other kind of document),
- station is one of S_RECEIPT or S_SLIP,
- the corresponding station is present.
- Parameters:
station
- The Fiscal Printer station to be used.documentType
- Identifier of a document stored in the Fiscal Printer.- Throws:
jpos.JposException
- If an error occurs.
-
beginInsertion
void beginInsertion(int timeout) throws jpos.JposExceptionFinal part of BeginInsertion method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpPresent is true,
- timeout is ≥ 0 or FOREVER,
- PrinterState is not PS_LOCKED.
- Parameters:
timeout
- The timeout parameter gives the number of milliseconds.- Throws:
jpos.JposException
- If an error occurs.
-
beginItemList
void beginItemList(int vatID) throws jpos.JposExceptionFinal part of BeginItemList method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapItemList is true,
- PrinterState is PS_MONITOR (not in any other kind of document).
The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.- Parameters:
vatID
- Vat identifier for reporting.- Throws:
jpos.JposException
- If an error occurs.
-
beginNonFiscal
void beginNonFiscal() throws jpos.JposExceptionFinal part of BeginNonFiscal method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapNonFiscalMode is true,
- PrinterState is PS_MONITOR (not in any other kind of document).
- Throws:
jpos.JposException
- If an error occurs.
-
beginRemoval
void beginRemoval(int timeout) throws jpos.JposExceptionFinal part of BeginRemoval method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpPresent is true,
- timeout is ≥ 0 or FOREVER,
- PrinterState is not PS_LOCKED.
- Parameters:
timeout
- The timeout parameter gives the number of milliseconds.- Throws:
jpos.JposException
- If an error occurs.
-
beginTraining
void beginTraining() throws jpos.JposExceptionFinal part of BeginTraining method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapTrainingMode is true,
- TrainingModeActive is false,
- PrinterState is PS_MONITOR (not in any other kind of document).
- Throws:
jpos.JposException
- If an error occurs.
-
clearError
void clearError() throws jpos.JposExceptionFinal part of ClearError method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Throws:
jpos.JposException
- If an error occurs.
-
endFiscalDocument
void endFiscalDocument() throws jpos.JposExceptionFinal part of EndFiscalDocument method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpFiscalDocument is true,
- PrinterState is PS_FISCAL_DOCUMENT.
- Throws:
jpos.JposException
- If an error occurs.
-
endFiscalReceipt
void endFiscalReceipt(boolean printHeader) throws jpos.JposExceptionFinal part of EndFiscalReceipt method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT_ENDING or PS_FISCAL_RECEIPT.
If called from PS_FISCAL_RECEIPT, this method must throw an exception after the first item has just been sold. In this case, PrintRecVoid must be called explicitly.- Parameters:
printHeader
- Indicates if the header lines of the following receipt are to be printed at this time.- Throws:
jpos.JposException
- If an error occurs.
-
endFixedOutput
void endFixedOutput() throws jpos.JposExceptionFinal part of EndFixedOutput method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapFixedOutput is true,
- PrinterState is PS_FIXED_OUTPUT.
- Throws:
jpos.JposException
- If an error occurs.
-
endInsertion
void endInsertion() throws jpos.JposExceptionFinal part of EndInsertion method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpPresent is true,
- PrinterState is not PS_LOCKED.
- Throws:
jpos.JposException
- If an error occurs.
-
endItemList
void endItemList() throws jpos.JposExceptionFinal part of EndItemList method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapItemList is true,
- PrinterState is PS_ITEM_LIST.
- Throws:
jpos.JposException
- If an error occurs.
-
endNonFiscal
void endNonFiscal() throws jpos.JposExceptionFinal part of EndNonFiscal method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapNonFiscalMode is true,
- PrinterState is PS_NONFISCAL.
- Throws:
jpos.JposException
- If an error occurs.
-
endRemoval
void endRemoval() throws jpos.JposExceptionFinal part of EndRemoval method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpPresent is true,
- PrinterState is not PS_LOCKED.
- Throws:
jpos.JposException
- If an error occurs.
-
endTraining
void endTraining() throws jpos.JposExceptionFinal part of EndTraining method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapTrainingMode is true,
- TrainingModeActive is true,
- PrinterState is PS_MONITOR (not in any other kind of document).
- Throws:
jpos.JposException
- If an error occurs.
-
getData
Final part of GetData method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- AsyncMode is true or State is not S_BUSY,
- optArgs and data are not null and are of length 1,
- dataItem is one of the GD_ values as described for method GetData.
- dataItem is not one of GD_MID_VOID, GD_RECEIPT_NUMBER, one of the GD_ numbers for fiscal memory counts, one of the GD_ values for counter, GD_LINECOUNT or GD_DESCRIPTION_LENGTH, if final part for counters, numbers and lengths has been implementer in derived class.
- dataItem is not one of GD_CURRENT_TOTAL, GD_DAILY_TOTAL, GD_GRAND_TOTAL, GD_NOT_PAID, GD_REFUND or GD_REFUND_VOID, if final part for totalizers has been implementer in derived class.
- Parameters:
dataItem
- The specific data item to retrieve.optArgs
- For some dataItem this additional argument is used for further targeting.data
- Character string to hold the data retrieved.- Throws:
jpos.JposException
- If an error occurs.
-
getData
void getData(int dataItem, int[] optArgs, int[] data) throws jpos.JposExceptionFinal part of GetData method for counters, numbers and lengths. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- AsyncMode is true or State is not S_BUSY,
- optArgs and data are not null and are of length 1,
- dataItem is one of GD_MID_VOID, GD_RECEIPT_NUMBER, one of the GD_ numbers for fiscal memory counts, one of the GD_ values for counter, GD_LINECOUNT or GD_DESCRIPTION_LENGTH.
- Parameters:
dataItem
- The specific data item to retrieve.optArgs
- For some dataItem this additional argument is used for further targeting.data
- Integer to hold the data retrieved.- Throws:
jpos.JposException
- If an error occurs.
-
getData
void getData(int dataItem, int[] optArgs, long[] data) throws jpos.JposExceptionFinal part of GetData method for totalizers. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- AsyncMode is true or State is not S_BUSY,
- optArgs and data are not null and are of length 1,
- dataItem is one of GD_CURRENT_TOTAL, GD_DAILY_TOTAL, GD_GRAND_TOTAL, GD_NOT_PAID, GD_REFUND or GD_REFUND_VOID.
- Parameters:
dataItem
- The specific data item to retrieve.optArgs
- For some dataItem this additional argument is used for further targeting.data
- Currency (long variable) to hold the data retrieved.- Throws:
jpos.JposException
- If an error occurs.
-
getDate
Final part of GetDate method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- date is not null and is of length 1.
- Parameters:
date
- Date and time returned as a string.- Throws:
jpos.JposException
- If an error occurs.
-
getTotalizer
Deprecated.Final part of GetTotalizer method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- data is not null and is of length 1,
- optArgs is one of the GT_ values as described for method GetTotalizer.
This method has been marked as deprecated. Please use GetTotalizer with long[1] instead of String[1] as data argument.- Parameters:
vatID
- VAT identifier of the required totalizer.optArgs
- Specifies the required totalizer.data
- Totalizer returned as a string.- Throws:
jpos.JposException
- If an error occurs.
-
getTotalizer
void getTotalizer(int vatID, int optArgs, long[] data) throws jpos.JposExceptionFinal part of GetTotalizer method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- data is not null and is of length 1,
- optArgs is one of the GT_ values as described for method GetTotalizer.
- Parameters:
vatID
- VAT identifier of the required totalizer.optArgs
- Specifies the required totalizer.data
- Totalizer returned as currency value.- Throws:
jpos.JposException
- If an error occurs.
-
getVatEntry
void getVatEntry(int vatID, int optArgs, int[] vatRate) throws jpos.JposExceptionFinal part of GetVatEntry method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapHasVatTable is true.
- vatRate is not null and is of length 1,
- Parameters:
vatID
- VAT identifier of the required rate.optArgs
- For some countries, this additional argument may be needed.vatRate
- The rate associated with the VAT identifier.- Throws:
jpos.JposException
- If an error occurs.
-
printDuplicateReceipt
void printDuplicateReceipt() throws jpos.JposExceptionFinal part of PrintDuplicateReceipt method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapDuplicateReceipt is true,
- PrinterState is PS_MONITOR,
- State is not S_BUSY.
The default implementation should be called within derived methods to ensure that the property DuplicateReceipt is updated as expected.- Throws:
jpos.JposException
- If an error occurs.
-
printPeriodicTotalsReport
Final part of PrintPeriodicTotalsReport method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_MONITOR,
- data1 and data2 are not null,
- both, date1 and date2, are well-formatted date strings as specified in the UPOS specification,
- date2 does not specify any date before date1.
- Parameters:
date1
- Starting date of report to print.date2
- Ending date of report to print.- Throws:
jpos.JposException
- If an error occurs.
-
printPowerLossReport
void printPowerLossReport() throws jpos.JposExceptionFinal part of PrintPowerLossReport method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPowerLossReport is true,
- PrinterState is PS_MONITOR.
- Throws:
jpos.JposException
- If an error occurs.
-
printReport
Final part of PrintReport method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_MONITOR,
- reportType is one of RT_ORDINAL, RT_DATE or RT_EOD_ORDINAL,
- if reportType == RT_DATE: startNum and endNum are date values as specified in the UPOS specification and startNum specifies a date equal to or before endNum.
- if reportType != RT_DATE: startNum and endNum are numerical values and endNum is zero or startNum ≤ endNum.
- Parameters:
reportType
- The kind of report to print.startNum
- Starting record in fiscal printer.endNum
- Final record in fiscal printer.- Throws:
jpos.JposException
- If an error occurs.
-
printXReport
void printXReport() throws jpos.JposExceptionFinal part of PrintXReport method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapXReport is true,
- PrinterState is PS_MONITOR.
- Throws:
jpos.JposException
- If an error occurs.
-
printZReport
void printZReport() throws jpos.JposExceptionFinal part of PrintZReport method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_MONITOR.
- Throws:
jpos.JposException
- If an error occurs.
-
resetPrinter
void resetPrinter() throws jpos.JposExceptionFinal part of ResetPrinter method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Throws:
jpos.JposException
- If an error occurs.
-
setCurrency
void setCurrency(int newCurrency) throws jpos.JposExceptionFinal part of SetCurrency method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSetCurrency is true,
- DayOpened is false,
- newCurrency is one of the SC_ values (currently only SC_EURO).
- ActualCurrency is not the corresponding AC_value (currently: not AC_EUR).
- Parameters:
newCurrency
- The new currency.- Throws:
jpos.JposException
- If an error occurs.
-
setDate
Final part of SetDate method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- DayOpened is false,
- date is a valid date string as specified in the UPOS specification vor method SetDate.
- Parameters:
date
- Date and time as a string.- Throws:
jpos.JposException
- If an error occurs.
-
setHeaderLine
Final part of SetHeaderLine method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSetHeader is true,
- DayOpened is false,
- lineNumber is between 1 and NumHeaderLines,
- if CapReservedWord is true, text does not contain the word stored in property ReservedWord.
- Parameters:
lineNumber
- Line number of the header line to set.text
- Text to which to set the header line.doubleWidth
- Print this line in double wide characters.- Throws:
jpos.JposException
- If an error occurs.
-
setPOSID
Final part of SetPOSID method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSetPOSID is true,
- DayOpened is false,
- if CapReservedWord is true, neither POSID nor cashierID contains the word stored in property ReservedWord.
- Parameters:
POSID
- Identifier for the POS system.cashierID
- Identifier of the current cashier.- Throws:
jpos.JposException
- If an error occurs.
-
setStoreFiscalID
Final part of SetStoreFiscalID method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSetStoreFiscalID is true,
- DayOpened is false.
- Parameters:
ID
- Fiscal identifier.- Throws:
jpos.JposException
- If an error occurs.
-
setTrailerLine
Final part of SetTrailerLine method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSetTrailer is true,
- DayOpened is false,
- lineNumber is between 1 and NumTrailerLines,
- if CapReservedWord is true, text does not contain the word stored in property ReservedWord.
- Parameters:
lineNumber
- Line number of the trailer line to set.text
- Text to which to set the trailer line.doubleWidth
- Print this line in double wide characters.- Throws:
jpos.JposException
- If an error occurs.
-
setVatTable
void setVatTable() throws jpos.JposExceptionFinal part of SetVatTable method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapHasVatTable is true,
- CapSetVatTable is true,
- DayOpened is false.
- Throws:
jpos.JposException
- If an error occurs.
-
setVatValue
void setVatValue(int vatID, long vatValue) throws jpos.JposExceptionFinal part of SetVatValue method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapHasVatTable is true,
- CapSetVatTable is true,
- DayOpened is false,
- vatValue is a value ≤ 999999, representing a percent value ≤ 99.9999.
- vatID must be one of NumVatRate values. However, UPOS does not specify the upper or lower border of vatID. For example, if NumVatRate is 4, valid values for vatID might be 0 - 3, 1 - 4, '1' - '4', 'A' - 'D', the ASCII code of any character in "ABZN" ...
- Since UPOS does not define the format of vatValue, JavaPOS-SPF specifies vatValue as either a percentage value (either an integer between 100 and 999999, representing a percentage between 0.01 % and 99.9999 % with 4 implicit decimals, an integer value between 0 and 99, representing a percentage between 0 % and 99 % or a percentage between 0 % and 99.9999 %, specified as fixed-point number with a maximum of 4 decimals) or an integer and a percentage value, separated by comma, this method will only be called if only a percentage value has been specified.
- Parameters:
vatID
- Index of the VAT table entry to set.vatValue
- Tax value as a percentage.- Throws:
jpos.JposException
- If an error occurs.
-
setVatValue
void setVatValue(int vatID, int optArgs, int vatValue) throws jpos.JposExceptionFinal part of SetVatValue method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapHasVatTable is true,
- CapSetVatTable is true,
- DayOpened is false,
- vatValue is a value ≤ 999999, representing a percent value ≤ 99.9999.
- vatID must be one of NumVatRate values. However, UPOS does not specify the upper or lower border of vatID. For example, if NumVatRate is 4, valid values for vatID might be 0 - 3, 1 - 4, '1' - '4', 'A' - 'D', the ASCII code of any character in "ABZN" ...
- Since UPOS does not define the format of vatValue, JavaPOS-SPF specifies vatValue as either a percentage value (either an integer between 100 and 999999, representing a percentage between 0.01 % and 99.9999 % with 4 implicit decimals, an integer value between 0 and 99, representing a percentage between 0 % and 99 % or a percentage between 0 % and 99.9999 %, specified as fixed-point number with a maximum of 4 decimals) or an integer and a percentage value, separated by comma, this method will only be called if an integer and a percentage value have been specified.
- Parameters:
vatID
- Index of the VAT table entry to set.optArgs
- Integer value, to be specified in getVatEntry method to retrieve this vat rate.vatValue
- Tax value as a percentage.- Throws:
jpos.JposException
- If an error occurs.
-
verifyItem
Final part of VerifyItem method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapHasVatTable is true,
- CapItemList is true,
- PrinterState is PS_ITEM_LIST,
- If CapReservedWord is true: itemName does not contain the contents of property ReservedWord.
- itemName may not contain invalid characters and must not exceed a specific length.
- vatID must be one of NumVatRate values. However, UPOS does not specify the upper or lower border of vatID. For example, if NumVatRate is 4, valid values for vatID might be 0 - 3, 1 - 4, '1' - '4', 'A' - 'D', the ASCII code of any character in "ABZN" ...
- Parameters:
itemName
- Item to be verified.vatID
- VAT identifier of the item.- Throws:
jpos.JposException
- If an error occurs.
-
printFiscalDocumentLine
Validation part of PrintFiscalDocumentLine method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapSlpFiscalDocument is true,
- PrinterState is PS_FISCAL_DOCUMENT,
- documentLine is not null.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- CapSlpEmptySensor is false or SlpEmpty is false.
- Parameters:
documentLine
- Line to be printed on fiscal slip.- Returns:
- PrintFiscalDocumentLine object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printFiscalDocumentLine
Final part of PrintFiscalDocumentLine method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintFiscalDocumentLine object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- The slip station is present.
- CapCoverSensor is false or CoverOpen is false,
- CapSlpEmptySensor is false or SlpEmpty is false.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintFiscalDocumentLine.- Throws:
jpos.JposException
- If an error occurs.
-
printFixedOutput
PrintFixedOutput printFixedOutput(int documentType, int lineNumber, String data) throws jpos.JposExceptionValidation part of PrintFixedOutput method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapFixedOutput is true,
- PrinterState is PS_FIXED_OUTPUT,
- data is not null.
- State is not S_BUSY.
On success, the station stored within the returned PrintFixedOutput object must be set to the correct print station. If the implementation supports fixed output only to the receipt station, no further action is necessary because the default station is receipt. If the implementation supports fixed output on slip and slip has been selected in beginFixedOutput, PrintFixedOutput.changeToSlip() must be called to change the station before returning.- Parameters:
documentType
- Identifier of a document stored in the Fiscal Printer.lineNumber
- Number of the line in the document to print.data
- String parameter for placement in printed line.- Returns:
- PrintFixedOutput object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printFixedOutput
Final part of PrintFixedOutput method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintFixedOutput object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, especially the following additional checks that have not been made preceiding the validation part:- The station specified in beginFixedOutput is present.
- CapCoverSensor is false or CoverOpen is false,
- the corresponding empty paper sensor is not present signals paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintFixedOutput.- Throws:
jpos.JposException
- If an error occurs.
-
printNormal
Validation part of PrintNormal method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_NONFISCAL, or PrinterState is PS_FISCAL_RECEIPT and FiscalReceiptType is RT_GENERIC, RT_CASH_IN or RT_CASH_OUT,
- station is one of S_JOURNAL, S_RECEIPT or S_SLIP,
- The corresponding presence property (CapJrnPresent, CapRecPresent or CapSlpPresent) is true,
- data is not null.
If AsyncMode is false:- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the corresponding empty paper sensor is not present or signals paper present.
- Parameters:
station
- The Fiscal Printer station to be used.data
- The characters to be printed.- Returns:
- PrintNormal object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printNormal
Final part of PrintNormal method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintNormal object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- The station(s) specified by getStation() is present.
- CapCoverSensor is false or CoverOpen is false,
- the corresponding empty paper sensor is not present or signals paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintNormal.- Throws:
jpos.JposException
- If an error occurs.
-
printRecCash
Validation part of PrintRecCash method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is true,
- FiscalReceiptType is RT_CASH_IN or RT_CASH_OUT,
- amount is > 0.
- amount is a multiple of smallest cash units (e.g. a multiple of 100 for Euro).
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
amount
- Amount to be incremented or decremented.- Returns:
- PrintRecCash object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecCash
Final part of PrintRecCash method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecCash object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecCash.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItem
PrintRecItem printRecItem(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName) throws jpos.JposExceptionValidation part of PrintRecItem method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- amount quantity and price are ≥ 0,
- description and unitName are not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine and PostLine must be reset to an empty string at least at the end of the final part of PrintRecItem.- Parameters:
description
- Text describing the item sold.price
- Price of the line item.quantity
- Number of items. If zero, a single item is assumed.vatInfo
- VAT rate identifier or amount.unitPrice
- Price of each item.unitName
- Name of the unit.- Returns:
- PrintRecItem object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItem
Final part of PrintRecItem method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItem object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItem.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemAdjustment
PrintRecItemAdjustment printRecItemAdjustment(int adjustmentType, String description, long amount, int vatInfo) throws jpos.JposExceptionValidation part of PrintRecItemAdjustment method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- adjustmentType is one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_PERCENTAGE_DISCOUNT, AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- if CapAmountAdjustment is false, adjustmentType is one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- if CapPercentAdjustment is false, adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- if CapPositiveAdjustment is false, adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_COUPON_AMOUNT_DISCOUNT, AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- amount > 0,
- description is not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecItemAdjustment.- Parameters:
adjustmentType
- Type of adjustment.description
- Text describing the item sold.amount
- Number of items. If zero, a single item is assumed.vatInfo
- VAT rate identifier or amount.- Returns:
- PrintRecItemAdjustment object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemAdjustment
Final part of PrintRecItemAdjustment method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItemAdjustment object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItemAdjustment.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemAdjustmentVoid
PrintRecItemAdjustmentVoid printRecItemAdjustmentVoid(int adjustmentType, String description, long amount, int vatInfo) throws jpos.JposExceptionValidation part of PrintRecItemAdjustmentVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- adjustmentType is one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_PERCENTAGE_DISCOUNT, AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- if CapAmountAdjustment is false, adjustmentType is one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- if CapPercentAdjustment is false, adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- if CapPositiveAdjustment is false, adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_COUPON_AMOUNT_DISCOUNT, AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- amount > 0,
- description is not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecItemAdjustmentVoid.- Parameters:
adjustmentType
- Type of adjustment.description
- Text describing the item sold.amount
- Number of items. If zero, a single item is assumed.vatInfo
- VAT rate identifier or amount.- Returns:
- PrintRecItemAdjustmentVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemAdjustmentVoid
Final part of PrintRecItemAdjustmentVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItemAdjustmentVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItemAdjustmentVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemFuel
PrintRecItemFuel printRecItemFuel(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName, long specialTax, String specialTaxName) throws jpos.JposExceptionValidation part of PrintRecItemFuel method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- amount, quantity, price and specialTax are ≥ 0,
- description, unitName and specialTaxName are not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
It might be a good solution to set Preline and / or PostLine to an empty string whenever they should be printed by the service and to let them unchanged otherwise.- Parameters:
description
- Text describing the item sold.price
- Price of the line item.quantity
- Number of items. If zero, a single item is assumed.vatInfo
- VAT rate identifier or amount.unitPrice
- Price of each item.unitName
- Name of the unit.specialTax
- Special tax amount, e.g., road tax.specialTaxName
- Name of the special tax.- Returns:
- PrintRecItemFuel object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemFuel
Final part of PrintRecItemFuel method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItemFuel object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItemFuel.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemFuelVoid
PrintRecItemFuelVoid printRecItemFuelVoid(String description, long price, int vatInfo, long specialTax) throws jpos.JposExceptionValidation part of PrintRecItemFuelVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- price and specialTax are ≥ 0,
- description is not null and does not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
It might be a good solution to set Preline and / or PostLine to an empty string whenever they should be printed by the service and to let them unchanged otherwise.- Parameters:
description
- Text describing the item sold.price
- Price of the line item.vatInfo
- VAT rate identifier or amount.specialTax
- Special tax amount, e.g., road tax.- Returns:
- PrintRecItemFuelVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemFuelVoid
Final part of PrintRecItemFuelVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItemFuelVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItemFuelVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemVoid
PrintRecItemVoid printRecItemVoid(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName) throws jpos.JposExceptionValidation part of PrintRecItemVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- amount, quantity and price are ≥ 0,
- description and unitName are not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine and PostLine must be reset to an empty string at least at the end of the final part of PrintRecItemVoid.- Parameters:
description
- Text describing the item sold.price
- Price of the line item.quantity
- Number of items. If zero, a single item is assumed.vatInfo
- VAT rate identifier or amount.unitPrice
- Price of each item.unitName
- Name of the unit.- Returns:
- PrintRecItemVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemVoid
Final part of PrintRecItemVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItemVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItemVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemRefund
PrintRecItemRefund printRecItemRefund(String description, long amount, int quantity, int vatInfo, long unitAmount, String unitName) throws jpos.JposExceptionValidation part of PrintRecItemRefund method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE or RT_REFUND,
- amount, quantity and price are ≥ 0,
- description and unitName are not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecItemRefund.- Parameters:
description
- Text describing the item sold.amount
- Price of the line item.quantity
- Number of items. If zero, a single item is assumed.vatInfo
- VAT rate identifier or amount.unitAmount
- Price of each item.unitName
- Name of the unit.- Returns:
- PrintRecItemRefund object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemRefund
Final part of PrintRecItemRefund method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItemRefund object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItemRefund.- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemRefundVoid
PrintRecItemRefundVoid printRecItemRefundVoid(String description, long amount, int quantity, int vatInfo, long unitAmount, String unitName) throws jpos.JposExceptionValidation part of PrintRecItemRefundVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE or RT_REFUND,
- amount, quantity and price are ≥ 0,
- description and unitName are not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
description
- Text describing the item sold.amount
- Price of the line item.quantity
- Number of items. If zero, a single item is assumed.vatInfo
- VAT rate identifier or amount.unitAmount
- Price of each item.unitName
- Name of the unit.- Returns:
- PrintRecItemRefundVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecItemRefundVoid
Final part of PrintRecItemRefundVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecItemRefundVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecItemRefundVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecMessage
Validation part of PrintRecMessage method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapAdditionalLines is true,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- amount is ≥ 0,
- description is not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present,
- description in not longer than MessageLength property specifies.
- Parameters:
message
- Text message to print.- Returns:
- PrintRecMessage object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecMessage
Final part of PrintRecMessage method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecMessage object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecMessage.- Throws:
jpos.JposException
- If an error occurs.
-
printRecNotPaid
Validation part of PrintRecNotPaid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapReceiptNotPaid is true,
- PrinterState is PS_FISCAL_RECEIPT or PS_FISCAL_RECEIPT_TOTAL,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- amount is > 0,
- description is not null and does not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
description
- Text describing the not paid amount.amount
- Amount not paid.- Returns:
- PrintRecNotPaid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecNotPaid
Final part of PrintRecNotPaid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecNotPaid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecNotPaid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecPackageAdjustment
@Deprecated PrintRecPackageAdjustment printRecPackageAdjustment(int adjustmentType, String description, String vatAdjustment) throws jpos.JposExceptionDeprecated.Validation part of PrintRecPackageAdjustment method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPackageAdjustment is true,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- depending on the value of AllowItemAdjustmentTypesInPackageAdjustment of the FiscalPrinterService object bound to the device implementation, adjustmentType is one of FPTR_AT_DISCOUNT and FPTR_AT_SURCHARGE, or one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_PERCENTAGE_DISCOUNT, AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE and AT_COUPON_AMOUNT_DISCOUNT,
- description is not null and does not contain the reserved word, if any,
- vatAdjustment is not null and consists of no more than NumVatRates value pairs, each consisting of two values: An integer (the vat id) and a currency value (decimal number with maximum 4 decimals,
- Each vat id occurs only once within vatAdjustment.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
The implementation should set property PreLine to an empty string. Even if the UPOS specification tells that this shall be done after the command has been executed, this should be done here because the contents of this property is buffered in the PrePostOutputRequest and the application should have the opportunity to set this property for further print requests after a print request has been enqueued for asynchronous processing.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecPackageAdjustment.
This method has been replaced by the method of the same name with additional parameter parsedAdjustments and has been marked as deprecated.- Parameters:
adjustmentType
- Type of adjustment.description
- Text describing the adjustment.vatAdjustment
- String containing a list of adjustment(s) to be voided for different VAT(s). See UPOS method PrintRecPackageAdjustment.- Returns:
- PrintRecPackageAdjustment object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecPackageAdjustment
PrintRecPackageAdjustment printRecPackageAdjustment(int adjustmentType, String description, String vatAdjustment, Map<Integer,Number> parsedAdjustments) throws jpos.JposExceptionValidation part of PrintRecPackageAdjustment method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPackageAdjustment is true,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- depending on the value of AllowItemAdjustmentTypesInPackageAdjustment of the FiscalPrinterService object bound to the device implementation, adjustmentType is one of FPTR_AT_DISCOUNT and FPTR_AT_SURCHARGE, or one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_PERCENTAGE_DISCOUNT, AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE and AT_COUPON_AMOUNT_DISCOUNT,
- description is not null and does not contain the reserved word, if any,
- vatAdjustment is not null and consists of no more than NumVatRates value pairs, each consisting of two values: An integer (the vat id) and a currency value (decimal number with maximum 4 decimals,
- Each vat id occurs only once within vatAdjustment.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
The implementation should set property PreLine to an empty string. Even if the UPOS specification tells that this shall be done after the command has been executed, this should be done here because the contents of this property is buffered in the PrePostOutputRequest and the application should have the opportunity to set this property for further print requests after a print request has been enqueued for asynchronous processing.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecPackageAdjustment.- Parameters:
adjustmentType
- Type of adjustment.description
- Text describing the adjustment.vatAdjustment
- String containing a list of adjustment(s) to be voided for different VAT(s). See UPOS method PrintRecPackageAdjustment.parsedAdjustments
- Map containing the parsed vat ids and adjustments. For each pair of vat id and adjustment amount, it contains the adjustment amount with the corresponding vat id as the key. A percentage amount will be stored in a Number instance of type Integer, a fixed amount in a Number instance of type Long.- Returns:
- PrintRecPackageAdjustment object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecPackageAdjustment
Final part of PrintRecPackageAdjustment method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecPackageAdjustment object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecPackageAdjustment.- Throws:
jpos.JposException
- If an error occurs.
-
printRecPackageAdjustVoid
@Deprecated PrintRecPackageAdjustVoid printRecPackageAdjustVoid(int adjustmentType, String vatAdjustment) throws jpos.JposExceptionDeprecated.Validation part of PrintRecPackageAdjustVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPackageAdjustment is true,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- depending on the value of AllowItemAdjustmentTypesInPackageAdjustment of the FiscalPrinterService object bound to the device implementation, adjustmentType is one of FPTR_AT_DISCOUNT and FPTR_AT_SURCHARGE, or one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_PERCENTAGE_DISCOUNT, AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE and AT_COUPON_AMOUNT_DISCOUNT,
- vatAdjustment is not null and consists of no more than NumVatRates value pairs, each consisting of two values: An integer (the vat id) and a currency value (decimal number with maximum 4 decimals,
- Each vat id occurs only once within vatAdjustment.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
The implementation should sets property PreLine to an empty string. Even if the UPOS specification tells that this shall be done after the command has been executed, this should be done here because the contents of this properties is buffered in the PrePostOutputRequest and the application should have the opportunity to set this property for further print requests after a print request has been enqueued for asynchronous processing.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecPackageAdjustVoid.
This method has been replaced by the method of the same name with additional parameter parsedAdjustments and has been marked as deprecated.- Parameters:
adjustmentType
- Type of adjustment.vatAdjustment
- String containing a list of adjustment(s) to be voided for different VAT(s). See UPOS method PrintRecPackageAdjustVoid.- Returns:
- PrintRecPackageAdjustVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecPackageAdjustVoid
PrintRecPackageAdjustVoid printRecPackageAdjustVoid(int adjustmentType, String vatAdjustment, Map<Integer,Number> parsedAdjustments) throws jpos.JposExceptionValidation part of PrintRecPackageAdjustVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPackageAdjustment is true,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- depending on the value of AllowItemAdjustmentTypesInPackageAdjustment of the FiscalPrinterService object bound to the device implementation, adjustmentType is one of FPTR_AT_DISCOUNT and FPTR_AT_SURCHARGE, or one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_PERCENTAGE_DISCOUNT, AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE and AT_COUPON_AMOUNT_DISCOUNT,
- vatAdjustment is not null and consists of no more than NumVatRates value pairs, each consisting of two values: An integer (the vat id) and a currency value (decimal number with maximum 4 decimals,
- Each vat id occurs only once within vatAdjustment.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
The implementation should sets property PreLine to an empty string. Even if the UPOS specification tells that this shall be done after the command has been executed, this should be done here because the contents of this properties is buffered in the PrePostOutputRequest and the application should have the opportunity to set this property for further print requests after a print request has been enqueued for asynchronous processing.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecPackageAdjustVoid.- Parameters:
adjustmentType
- Type of adjustment.vatAdjustment
- String containing a list of adjustment(s) to be voided for different VAT(s). See UPOS method PrintRecPackageAdjustVoid.parsedAdjustments
- Map containing the parsed vat ids and adjustments. For each pair of vat id and adjustment amount, it contains the adjustment amount with the corresponding vat id as the key.- Returns:
- PrintRecPackageAdjustVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecPackageAdjustVoid
Final part of PrintRecPackageAdjustVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecPackageAdjustVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecPackageAdjustVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecRefund
PrintRecRefund printRecRefund(String description, long amount, int vatInfo) throws jpos.JposExceptionValidation part of PrintRecRefund method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE or RT_REFUND,
- amount is ≥ 0,
- description is not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecRefund.- Parameters:
description
- Text describing the item sold.amount
- Price of the line item.vatInfo
- VAT rate identifier or amount.- Returns:
- PrintRecRefund object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecRefund
Final part of PrintRecRefund method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecRefund object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecRefund.- Throws:
jpos.JposException
- If an error occurs.
-
printRecRefundVoid
PrintRecRefundVoid printRecRefundVoid(String description, long amount, int vatInfo) throws jpos.JposExceptionValidation part of PrintRecRefundVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE or RT_REFUND,
- amount is ≥ 0,
- description is not null and do not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
description
- Text describing the item sold.amount
- Price of the line item.vatInfo
- VAT rate identifier or amount.- Returns:
- PrintRecRefundVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecRefundVoid
Final part of PrintRecRefundVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecRefundVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecRefundVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecSubtotal
Validation part of PrintRecSubtotal method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- amount is ≥ 0.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PostLine must be reset to an empty string at least at the end of the final part of PrintRecSubtotal.- Parameters:
amount
- Price of the line item.- Returns:
- PrintRecSubtotal object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecSubtotal
Final part of PrintRecSubtotal method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecSubtotal object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecSubtotal.- Throws:
jpos.JposException
- If an error occurs.
-
printRecSubtotalAdjustment
PrintRecSubtotalAdjustment printRecSubtotalAdjustment(int adjustmentType, String description, long amount) throws jpos.JposExceptionValidation part of PrintRecSubtotalAdjustment method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE, AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_AMOUNT_DISCOUNT or AT_COUPON_PERCENTAGE_DISCOUNT,
- CapSubAmountAdjustment is true or adjustmentType is neither AT_AMOUNT_DISCOUNT nor AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- CapSubPercentAdjustment is true or adjustmentType is neither AT_PERCENTAGE_DISCOUNT nor AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- CapPositiveSubtotalAdjustment is true or adjustmentType is neither AT_AMOUNT_SURCHARGE nor AT_PERCENTAGE_SURCHARGE,
- description is not null and does not contain the reserver word, if any.
- amount is ≥ 0.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecSubtotalAdjustment.- Parameters:
adjustmentType
- Type of adjustment.description
- Text describing the discount or surcharge.amount
- Amount or percent amount (in case of percent adjustment).- Returns:
- PrintRecSubtotalAdjustment object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecSubtotalAdjustment
Final part of PrintRecSubtotalAdjustment method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecSubtotalAdjustment object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecSubtotalAdjustment.- Throws:
jpos.JposException
- If an error occurs.
-
printRecSubtotalAdjustVoid
PrintRecSubtotalAdjustVoid printRecSubtotalAdjustVoid(int adjustmentType, long amount) throws jpos.JposExceptionValidation part of PrintRecSubtotalAdjustVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE, AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_AMOUNT_DISCOUNT or AT_COUPON_PERCENTAGE_DISCOUNT,
- CapSubAmountAdjustment is true or adjustmentType is neither AT_AMOUNT_DISCOUNT nor AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- CapSubPercentAdjustment is true or adjustmentType is neither AT_PERCENTAGE_DISCOUNT nor AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- CapPositiveSubtotalAdjustment is true or adjustmentType is neither AT_AMOUNT_SURCHARGE nor AT_PERCENTAGE_SURCHARGE,
- amount is ≥ 0.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine must be reset to an empty string at least at the end of the final part of PrintRecSubtotalAdjustVoid.- Parameters:
adjustmentType
- Type of adjustment.amount
- Amount or percent amount (in case of percent adjustment).- Returns:
- PrintRecSubtotalAdjustVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecSubtotalAdjustVoid
Final part of PrintRecSubtotalAdjustVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecSubtotalAdjustVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecSubtotalAdjustVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecTaxID
Validation part of PrintRecTaxID method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT_ENDING,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
taxId
- Customer identification with identification characters and tax number.- Returns:
- PrintRecTaxID object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecTaxID
Final part of PrintRecTaxID method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecTaxID object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecTaxID.- Throws:
jpos.JposException
- If an error occurs.
-
printRecTotal
PrintRecTotal printRecTotal(long total, long payment, String description) throws jpos.JposExceptionValidation part of PrintRecTotal method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT or PS_FISCAL_RECEIPT_TOTAL,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- total is ≥ 0,
- payment is ≥ 0.
In addition, If AsyncMode is false:- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PostLine must be reset to an empty string at least at the end of the final part of PrintRecTotal.- Parameters:
total
- Application computed receipt total.payment
- Amount of payment tendered.description
- Text description of the payment or the index of a predefined payment description. See UPOS method PrintRecTotal.- Returns:
- PrintRecTotal object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecTotal
Final part of PrintRecTotal method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecTotal object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecTotal.- Throws:
jpos.JposException
- If an error occurs.
-
printRecVoid
Validation part of PrintRecVoid method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT or PS_FISCAL_RECEIPT_TOTAL,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- description is not null and does not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
- Parameters:
description
- Text describing the void.- Returns:
- PrintRecVoid object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecVoid
Final part of PrintRecVoid method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecVoid object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecVoid.- Throws:
jpos.JposException
- If an error occurs.
-
printRecVoidItem
PrintRecVoidItem printRecVoidItem(String description, long price, int quantity, int adjustmentType, long adjustment, int vatInfo) throws jpos.JposExceptionValidation part of PrintRecVoidItem method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- AllowDeprecatedMethods is true.
- Device is enabled,
- PrinterState is PS_FISCAL_RECEIPT,
- CapFiscalReceiptType is false or FiscalReceiptType is RT_SALES, RT_SERVICE, RT_SIMPLE_INVOICE or RT_REFUND,
- adjustmentType is one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE, AT_COUPON_PERCENTAGE_DISCOUNT, AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- if CapAmountAdjustment is false, adjustmentType is one of AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- if CapPercentAdjustment is false, adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_AMOUNT_SURCHARGE or AT_COUPON_AMOUNT_DISCOUNT,
- if CapPositiveAdjustment is false, adjustmentType is one of AT_AMOUNT_DISCOUNT, AT_COUPON_AMOUNT_DISCOUNT, AT_PERCENTAGE_DISCOUNT, AT_PERCENTAGE_SURCHARGE or AT_COUPON_PERCENTAGE_DISCOUNT,
- adjustment, quantity and price are ≥ 0,
- description is not null and does not contain the reserved word, if any.
- State is not S_BUSY,
- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
For synchronous processing, this difference should not be relevant. However, keep in mind that PreLine and PostLine must be reset to an empty string at least at the end of the final part of PrintRecItem.- Parameters:
description
- Text describing the item sold.price
- Price of the line item.quantity
- Number of items. If zero, a single item is assumed.adjustmentType
- Type of adjustment.adjustment
- Amount of the adjustment (discount or surcharge).vatInfo
- VAT rate identifier or amount.- Returns:
- PrintRecItem object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printRecVoidItem
Final part of PrintRecVoidItem method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintRecVoidItem object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before as well:- CapCoverSensor is false or CoverOpen is false,
- the empty paper sensors of the journal and the station specified by FiscalReceiptStation are not present or signal paper present.
The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintRecVoid.- Throws:
jpos.JposException
- If an error occurs.
-