Interface FiscalPrinterInterface

All Superinterfaces:
JposBaseInterface
All Known Implementing Classes:
FiscalPrinterProperties

public interface FiscalPrinterInterface extends JposBaseInterface
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 Details

    • additionalHeader

      void additionalHeader(String header) throws jpos.JposException
      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

      void additionalTrailer(String trailer) throws jpos.JposException
      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

      void changeDue(String changeDue) throws jpos.JposException
      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.
      cashreturn must at least be checked for valid length.
      Parameters:
      changeDue - Text for cash return.
      Throws:
      jpos.JposException - If an error occurs.
    • checkTotal

      void checkTotal(boolean check) throws jpos.JposException
      Final 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.JposException
      Final 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.JposException
      Final 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.JposException
      Final 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.JposException
      Final 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.JposException
      Final 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.JposException
      Final 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

      void postLine(String text) throws jpos.JposException
      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

      void preLine(String text) throws jpos.JposException
      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.JposException
      Final 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.JposException
      Final 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.JposException
      Final 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).
      The default implementation should be called within derived methods to ensure that the properties DayOpened and PrinterState are updated as expected.
      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.JposException
      Final 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).
      The default implementation should be called within derived methods to ensure that the properties DayOpened and PrinterState are updated as expected.
      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.JposException
      Final 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.
      The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.
      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.JposException
      Final 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.JposException
      Final 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).
      vatID will not be checked because it has no predefined allowed value range. Valid values are specified by each service vendor individually. Therefore vatID must be checked within each individual service implementation.
      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.JposException
      Final 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).
      The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • beginRemoval

      void beginRemoval(int timeout) throws jpos.JposException
      Final 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.JposException
      Final 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).
      The default implementation should be called within derived methods to ensure that the property TrainingModeActive is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • clearError

      void clearError() throws jpos.JposException
      Final 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.JposException
      Final 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.
      The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • endFiscalReceipt

      void endFiscalReceipt(boolean printHeader) throws jpos.JposException
      Final 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.
      The default implementation can be called within derived methods to ensure that the properties PrinterState and DuplicateReceipt are updated as expected.
      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.JposException
      Final 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.
      The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • endInsertion

      void endInsertion() throws jpos.JposException
      Final 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.JposException
      Final 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.
      The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • endNonFiscal

      void endNonFiscal() throws jpos.JposException
      Final 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.
      The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • endRemoval

      void endRemoval() throws jpos.JposException
      Final 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.JposException
      Final 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).
      The default implementation should be called within derived methods to ensure that the property PrinterState is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • getData

      void getData(int dataItem, int[] optArgs, String[] data) throws jpos.JposException
      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.
      Requested totalizer values returned in data[0] must be returned as decimal string with decimal dot, where trailing zeros up to and inclusive the decimal dot may be truncated. For example, a value of 123.45 can be returned as "123.45" or "123.4500", 100.00 can be returned as "100", "100.00" or "100.0000". Even if a value of 123.45 will be stored as 1234500 within a variable of type long, it must not be returned as "1234500".
      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.JposException
      Final 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.JposException
      Final 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.
      In this version of GetData, the requested totalizer must be returned in a currency value, implemented as long in JavaPOS with 4 implicit decimals. A value of 123.45 will be stored as 1234500.
      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

      void getDate(String[] date) throws jpos.JposException
      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 void getTotalizer(int vatID, int optArgs, String[] data) throws jpos.JposException
      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.
      The requested totalizer returned in data[0] must be returned as decimal string with decimal dot, where trailing zeros up to and inclusive the decimal dot may be truncated. For example, a value of 123.45 can be returned as "123.45" or "123.4500", 100.00 can be returned as "100", "100.00" or "100.0000". Even if a value of 123.45 will be stored as 1234500 within a variable of type long, it must not be returned as "1234500".
      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.JposException
      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.
      In this version of GetTotalizer, the requested totalizer must be returned in a currency value, implemented as long in JavaPOS with 4 implicit decimals. A value of 123.45 will be stored as 1234500.
      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.JposException
      Final 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.JposException
      Final 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.
      Since the UPOS specification does not clearly specify whether property DuplicateReceipt must be true, it can be checked by the specific implementation if this should be necessary.
      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

      void printPeriodicTotalsReport(String date1, String date2) throws jpos.JposException
      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.JposException
      Final 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

      void printReport(int reportType, String startNum, String endNum) throws jpos.JposException
      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.JposException
      Final 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.JposException
      Final 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.
      The default implementation should be called within derived methods to ensure that the property DayOpened is updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • resetPrinter

      void resetPrinter() throws jpos.JposException
      Final 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.
      The default implementation should be called within derived methods to ensure that the properties PrinterState, TrainingModeActive and DuplicateReceipt are updated as expected.
      Throws:
      jpos.JposException - If an error occurs.
    • setCurrency

      void setCurrency(int newCurrency) throws jpos.JposException
      Final 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).
      The default implementation should be called within derived methods to ensure that the property ActualCurrency is updated as expected.
      Parameters:
      newCurrency - The new currency.
      Throws:
      jpos.JposException - If an error occurs.
    • setDate

      void setDate(String date) throws jpos.JposException
      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

      void setHeaderLine(int lineNumber, String text, boolean doubleWidth) throws jpos.JposException
      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.
      Any derived method should check whether the text length is valid in combination with doubleWidth. The UPOS specification does not specify how a service shall behave if doubleWidth is true and CapDoubleWidth is false.
      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

      void setPOSID(String POSID, String cashierID) throws jpos.JposException
      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.
      Any derived method should check whether length and format of POSID and cashierID are valid.
      Parameters:
      POSID - Identifier for the POS system.
      cashierID - Identifier of the current cashier.
      Throws:
      jpos.JposException - If an error occurs.
    • setStoreFiscalID

      void setStoreFiscalID(String ID) throws jpos.JposException
      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.
      Any derived method should check whether length and format of ID are valid.
      Parameters:
      ID - Fiscal identifier.
      Throws:
      jpos.JposException - If an error occurs.
    • setTrailerLine

      void setTrailerLine(int lineNumber, String text, boolean doubleWidth) throws jpos.JposException
      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.
      Any derived method should check whether the text length is valid in combination with doubleWidth. The UPOS specification does not specify how a service shall behave if doubleWidth is true and CapDoubleWidth is false.
      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.JposException
      Final 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.JposException
      Final 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.
      Attention: Each service implementation that supports setting VAT values must perform additional checks for vatID and vatValue:
      • 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.JposException
      Final 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.
      Attention: Each service implementation that supports setting VAT values must perform additional checks for vatID and vatValue:
      • 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

      void verifyItem(String itemName, int vatID) throws jpos.JposException
      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.
      Attention: Each service implementation that supports verifying items must perform additional checks for itemName and vatID:
      • 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

      PrintFiscalDocumentLine printFiscalDocumentLine(String documentLine) throws jpos.JposException
      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.
      In addition, If AsyncMode is false:
      • 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

      void printFiscalDocumentLine(PrintFiscalDocumentLine request) throws jpos.JposException
      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.JposException
      Validation 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.
      In addition, If AsyncMode is false:
      • 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

      void printFixedOutput(PrintFixedOutput request) throws jpos.JposException
      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

      PrintNormal printNormal(int station, String data) throws jpos.JposException
      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 PrinterState is FiscalReceiptType, station must logically match property FiscalReceiptStation.
      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

      void printNormal(PrintNormal request) throws jpos.JposException
      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

      PrintRecCash printRecCash(long amount) throws jpos.JposException
      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).
      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.
      Parameters:
      amount - Amount to be incremented or decremented.
      Returns:
      PrintRecCash object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • printRecCash

      void printRecCash(PrintRecCash request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      The implementation should sets properties PreLine and PostLine 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 these properties are buffered in the PrePostOutputRequest and the application should have the opportunity to set these properties 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 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

      void printRecItem(PrintRecItem request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      The implementation should sets properties 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 these properties are buffered in the PrePostOutputRequest and the application should have the opportunity to set these properties 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 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

      void printRecItemAdjustment(PrintRecItemAdjustment request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      The implementation should sets properties 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 these properties are buffered in the PrePostOutputRequest and the application should have the opportunity to set these properties 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 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

      void printRecItemAdjustmentVoid(PrintRecItemAdjustmentVoid request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      FiscalPrinter specific implementations should set properties PreLine and PostLine as expected. The UPOS specification does not tells anything about handling of PreLine and PostLine in PrintRecItemFuel, therefore handling is vendor specific.
      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

      void printRecItemFuel(PrintRecItemFuel request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      FiscalPrinter specific implementations should set properties PreLine and PostLine as expected. The UPOS specification does not tells anything about handling of PreLine and PostLine in PrintRecItemFuelVoid, therefore handling is vendor specific.
      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

      void printRecItemFuelVoid(PrintRecItemFuelVoid request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      The implementation should sets properties PreLine and PostLine 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 these properties are buffered in the PrePostOutputRequest and the application should have the opportunity to set these properties 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 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

      void printRecItemVoid(PrintRecItemVoid request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      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 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

      void printRecItemRefund(PrintRecItemRefund request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      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

      void printRecItemRefundVoid(PrintRecItemRefundVoid request) throws jpos.JposException
      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

      PrintRecMessage printRecMessage(String message) throws jpos.JposException
      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.
      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,
      • 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

      void printRecMessage(PrintRecMessage request) throws jpos.JposException
      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

      PrintRecNotPaid printRecNotPaid(String description, long amount) throws jpos.JposException
      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.
      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.
      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

      void printRecNotPaid(PrintRecNotPaid request) throws jpos.JposException
      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.JposException
      Deprecated.
      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.
      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.
      Keep in mind:The adjustmentType values AT_DISCOUNT and AT_SURCHARGE, described in the UPOS specification, are not defined in some jpos framework implementations. In these cases, JavaPOS-SPF works with self-defined values. The defaults are AT_AMOUNT_DISCOUNT for FPTR_AT_DISCOUNT and AT_AMOUNT_SURCHARGE for FPTR_AT_SURCHARGE. Any device specific implementation should allow to change the defaults via jpos.xml.
      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.JposException
      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.
      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.
      Keep in mind:The adjustmentType values AT_DISCOUNT and AT_SURCHARGE, described in the UPOS specification, are not defined in some jpos framework implementations. In these cases, JavaPOS-SPF works with self-defined values. The defaults are AT_AMOUNT_DISCOUNT for FPTR_AT_DISCOUNT and AT_AMOUNT_SURCHARGE for FPTR_AT_SURCHARGE. Any device specific implementation should allow to change the defaults via jpos.xml.
      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

      void printRecPackageAdjustment(PrintRecPackageAdjustment request) throws jpos.JposException
      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.JposException
      Deprecated.
      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.
      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.
      Keep in mind:The adjustmentType values AT_DISCOUNT and AT_SURCHARGE, described in the UPOS specification, are not defined in some jpos framework implementations. In these cases, JavaPOS-SPF works with self-defined values. The defaults are AT_AMOUNT_DISCOUNT for FPTR_AT_DISCOUNT and AT_AMOUNT_SURCHARGE for FPTR_AT_SURCHARGE. Any device specific implementation should allow to change the defaults via jpos.xml.
      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.JposException
      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.
      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.
      Keep in mind:The adjustmentType values AT_DISCOUNT and AT_SURCHARGE, described in the UPOS specification, are not defined in some jpos framework implementations. In these cases, JavaPOS-SPF works with self-defined values. The defaults are AT_AMOUNT_DISCOUNT for FPTR_AT_DISCOUNT and AT_AMOUNT_SURCHARGE for FPTR_AT_SURCHARGE. Any device specific implementation should allow to change the defaults via jpos.xml.
      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

      void printRecPackageAdjustVoid(PrintRecPackageAdjustVoid request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      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 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

      void printRecRefund(PrintRecRefund request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      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

      void printRecRefundVoid(PrintRecRefundVoid request) throws jpos.JposException
      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

      PrintRecSubtotal printRecSubtotal(long amount) throws jpos.JposException
      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.
      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.
      The implementation should sets property PostLine 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 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

      void printRecSubtotal(PrintRecSubtotal request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      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 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

      void printRecSubtotalAdjustment(PrintRecSubtotalAdjustment request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      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 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

      void printRecSubtotalAdjustVoid(PrintRecSubtotalAdjustVoid request) throws jpos.JposException
      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

      PrintRecTaxID printRecTaxID(String taxId) throws jpos.JposException
      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,
      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.
      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

      void printRecTaxID(PrintRecTaxID request) throws jpos.JposException
      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.JposException
      Validation 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 CapPredefinedPaymentLines is true, description equals one of the words stored in the PredefinedPaymentLines property (a comma separated list of payment description placeholders).
      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.
      The implementation should sets property PostLine 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 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

      void printRecTotal(PrintRecTotal request) throws jpos.JposException
      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

      PrintRecVoid printRecVoid(String description) throws jpos.JposException
      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.
      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.
      Parameters:
      description - Text describing the void.
      Returns:
      PrintRecVoid object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • printRecVoid

      void printRecVoid(PrintRecVoid request) throws jpos.JposException
      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.JposException
      Validation 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.
      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.
      The implementation should sets properties PreLine and PostLine 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 these properties are buffered in the PrePostOutputRequest and the application should have the opportunity to set these properties 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 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

      void printRecVoidItem(PrintRecVoidItem request) throws jpos.JposException
      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.