Class FiscalPrinterProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.fiscalprinter.FiscalPrinterProperties
All Implemented Interfaces:
FiscalPrinterInterface, JposBaseInterface

public class FiscalPrinterProperties extends JposCommonProperties implements FiscalPrinterInterface
Class containing the FiscalPrinter specific properties, their default values and default implementations of FiscalPrinterInterface. For details about properties, methods and method parameters, see UPOS specification, chapter Fiscal Printer.
  • Field Details

    • IdleWaiter

      public SyncObject IdleWaiter
      Object to be used to wait until all asynchronous commands derived from OutputRequest have been finished.
    • ActualCurrencyDef

      public int ActualCurrencyDef
      Default value of ActualCurrency property. Default: AC_OTHER. Should be overwritten by objects derived from JposDevice within the changeDefaults method and after a successful call to SetCurrency.
    • ActualCurrency

      public int ActualCurrency
      UPOS property AdditionalHeader.
    • AdditionalHeader

      public String AdditionalHeader
      UPOS property AdditionalHeader.
    • AdditionalTrailer

      public String AdditionalTrailer
      UPOS property AdditionalTrailer.
    • AmountDecimalPlacesDef

      public int AmountDecimalPlacesDef
      Default value of AmountDecimalPlaces property. Default: 2. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • AmountDecimalPlaces

      public int AmountDecimalPlaces
      UPOS property AmountDecimalPlaces.
    • CapAdditionalHeader

      public boolean CapAdditionalHeader
      UPOS property CapAdditionalHeader. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapAdditionalLines

      public boolean CapAdditionalLines
      UPOS property CapAdditionalLines. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapAdditionalTrailer

      public boolean CapAdditionalTrailer
      UPOS property CapAdditionalTrailer. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapAmountAdjustment

      public boolean CapAmountAdjustment
      UPOS property CapAmountAdjustment. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapAmountNotPaid

      public boolean CapAmountNotPaid
      UPOS property CapAmountNotPaid. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapChangeDue

      public boolean CapChangeDue
      UPOS property CapChangeDue. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapCheckTotal

      public boolean CapCheckTotal
      UPOS property CapCheckTotal. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapCoverSensor

      public boolean CapCoverSensor
      UPOS property CapCoverSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapDoubleWidth

      public boolean CapDoubleWidth
      UPOS property CapDoubleWidth. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapDuplicateReceipt

      public boolean CapDuplicateReceipt
      UPOS property CapDuplicateReceipt. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapEmptyReceiptIsVoidable

      public boolean CapEmptyReceiptIsVoidable
      UPOS property CapEmptyReceiptIsVoidable. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapFiscalReceiptStation

      public boolean CapFiscalReceiptStation
      UPOS property CapFiscalReceiptStation. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapFiscalReceiptType

      public boolean CapFiscalReceiptType
      UPOS property CapFiscalReceiptType. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapFixedOutput

      public boolean CapFixedOutput
      UPOS property CapFixedOutput. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapHasVatTable

      public boolean CapHasVatTable
      UPOS property CapHasVatTable. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapIndependentHeader

      public boolean CapIndependentHeader
      UPOS property CapIndependentHeader. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapItemList

      public boolean CapItemList
      UPOS property CapItemList. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapJrnEmptySensor

      public boolean CapJrnEmptySensor
      UPOS property CapJrnEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapJrnNearEndSensor

      public boolean CapJrnNearEndSensor
      UPOS property CapJrnNearEndSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapJrnPresent

      public boolean CapJrnPresent
      UPOS property CapJrnPresent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapMultiContractor

      public boolean CapMultiContractor
      UPOS property CapMultiContractor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapNonFiscalMode

      public boolean CapNonFiscalMode
      UPOS property CapNonFiscalMode. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapOnlyVoidLastItem

      public boolean CapOnlyVoidLastItem
      UPOS property CapOnlyVoidLastItem. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapOrderAdjustmentFirst

      public boolean CapOrderAdjustmentFirst
      UPOS property CapOrderAdjustmentFirst. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPackageAdjustment

      public boolean CapPackageAdjustment
      UPOS property CapPackageAdjustment. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPercentAdjustment

      public boolean CapPercentAdjustment
      UPOS property CapPercentAdjustment. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPositiveAdjustment

      public boolean CapPositiveAdjustment
      UPOS property CapPositiveAdjustment. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPositiveSubtotalAdjustment

      public boolean CapPositiveSubtotalAdjustment
      UPOS property CapPositiveSubtotalAdjustment. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPostPreLine

      public boolean CapPostPreLine
      UPOS property CapPostPreLine. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPowerLossReport

      public boolean CapPowerLossReport
      UPOS property CapPowerLossReport. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPredefinedPaymentLines

      public boolean CapPredefinedPaymentLines
      UPOS property CapPredefinedPaymentLines. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapReceiptNotPaid

      public boolean CapReceiptNotPaid
      UPOS property CapReceiptNotPaid. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRecEmptySensor

      public boolean CapRecEmptySensor
      UPOS property CapRecEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRecNearEndSensor

      public boolean CapRecNearEndSensor
      UPOS property CapRecNearEndSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRecPresent

      public boolean CapRecPresent
      UPOS property CapRecPresent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRemainingFiscalMemory

      public boolean CapRemainingFiscalMemory
      UPOS property CapRemainingFiscalMemory. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapReservedWord

      public boolean CapReservedWord
      UPOS property CapReservedWord. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSetCurrency

      public boolean CapSetCurrency
      UPOS property CapSetCurrency. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSetHeader

      public boolean CapSetHeader
      UPOS property CapSetHeader. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSetPOSID

      public boolean CapSetPOSID
      UPOS property CapSetPOSID. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSetStoreFiscalID

      public boolean CapSetStoreFiscalID
      UPOS property CapSetStoreFiscalID. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSetTrailer

      public boolean CapSetTrailer
      UPOS property CapSetTrailer. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSetVatTable

      public boolean CapSetVatTable
      UPOS property CapSetVatTable. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSlpEmptySensor

      public boolean CapSlpEmptySensor
      UPOS property CapSlpEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSlpFiscalDocument

      public boolean CapSlpFiscalDocument
      UPOS property CapSlpFiscalDocument. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSlpFullSlip

      public boolean CapSlpFullSlip
      UPOS property CapSlpFullSlip. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSlpNearEndSensor

      public boolean CapSlpNearEndSensor
      UPOS property CapSlpNearEndSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSlpPresent

      public boolean CapSlpPresent
      UPOS property CapSlpPresent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSlpValidation

      public boolean CapSlpValidation
      UPOS property CapSlpValidation. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSubAmountAdjustment

      public boolean CapSubAmountAdjustment
      UPOS property CapSubAmountAdjustment. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSubPercentAdjustment

      public boolean CapSubPercentAdjustment
      UPOS property CapSubPercentAdjustment. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSubtotal

      public boolean CapSubtotal
      UPOS property CapSubtotal. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapTotalizerType

      public boolean CapTotalizerType
      UPOS property CapTotalizerType. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapTrainingMode

      public boolean CapTrainingMode
      UPOS property CapTrainingMode. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapValidateJournal

      public boolean CapValidateJournal
      UPOS property CapValidateJournal. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapXReport

      public boolean CapXReport
      UPOS property CapXReport. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • ChangeDue

      public String ChangeDue
      UPOS property ChangeDue.
    • CheckTotal

      public boolean CheckTotal
      UPOS property CheckTotal.
    • ContractorId

      public int ContractorId
      UPOS property ContractorId.
    • CountryCodeDef

      public int CountryCodeDef
      Default value of CountryCode property. Default: CC_OTHER. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CountryCode

      public int CountryCode
      UPOS property CountryCode.
    • CoverOpenDef

      public boolean CoverOpenDef
      Default value of CoverOpen property. Default: false. Should be overwritten by objects derived from JposDevice after each status change.
    • CoverOpen

      public boolean CoverOpen
      UPOS property CoverOpen.
    • DateType

      public int DateType
      UPOS property DateType.
    • DayOpenedDef

      public boolean DayOpenedDef
      Default value of DayOpened property. Default: false. Should be overwritten by objects derived from JposDevice after Z report and after first fiscal receipt after the last Z report
    • DayOpened

      public boolean DayOpened
      UPOS property DayOpened.
    • DescriptionLength

      public int DescriptionLength
      UPOS property DescriptionLength. Default: 20. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DuplicateReceipt

      public boolean DuplicateReceipt
      UPOS property DuplicateReceipt.
    • ErrorLevel

      public int ErrorLevel
      UPOS property ErrorLevel.
    • ErrorOutID

      public int ErrorOutID
      UPOS property ErrorOutID.
    • ErrorState

      public int ErrorState
      UPOS property ErrorState.
    • ErrorStation

      public int ErrorStation
      UPOS property ErrorStation.
    • ErrorString

      public String ErrorString
      UPOS property ErrorString.
    • FiscalReceiptStation

      public int FiscalReceiptStation
      UPOS property FiscalReceiptStation.
    • FiscalReceiptType

      public int FiscalReceiptType
      UPOS property FiscalReceiptType.
    • JrnEmptyDef

      public boolean JrnEmptyDef
      Default value of JrnEmpty property. Default: false. Should be overwritten by objects derived from JposDevice after each status change.
    • JrnEmpty

      public boolean JrnEmpty
      UPOS property JrnEmpty.
    • JrnNearEndDef

      public boolean JrnNearEndDef
      Default value of JrnNearEnd property. Default: false. Should be overwritten by objects derived from JposDevice after each status change.
    • JrnNearEnd

      public boolean JrnNearEnd
      UPOS property JrnNearEnd.
    • MessageLengthDef

      public int MessageLengthDef
      Default value of MessageLength property. Default: 20. Should be overwritten by objects derived from JposDevice within the changeDefaults method and after any change due to printer mode change.
    • MessageLength

      public int MessageLength
      UPOS property MessageLength.
    • MessageType

      public int MessageType
      UPOS property MessageType.
    • NumHeaderLines

      public int NumHeaderLines
      UPOS property NumHeaderLines. Default: 0. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • NumTrailerLines

      public int NumTrailerLines
      UPOS property NumTrailerLines. Default: 0. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • NumVatRates

      public int NumVatRates
      UPOS property NumVatRates. Default: 0. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • PostLine

      public String PostLine
      UPOS property PostLine.
    • PredefinedPaymentLines

      public String PredefinedPaymentLines
      UPOS property PredefinedPaymentLines. Default: "". Should be overwritten by objects derived from JposDevice within the changeDefaults method if predefined payment lines are supported.
    • PreLine

      public String PreLine
      UPOS property PreLine.
    • PrinterStateDef

      public int PrinterStateDef
      Default value of PrinterState property. Default: PS_MONITOR. Should be overwritten by objects derived from JposDevice whenever the printer state has changed.
    • PrinterState

      public int PrinterState
      UPOS property PrinterState.
    • QuantityDecimalPlacesDef

      public int QuantityDecimalPlacesDef
      Default value of QuantityDecimalPlaces property. Default: 0. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • QuantityDecimalPlaces

      public int QuantityDecimalPlaces
      UPOS property QuantityDecimalPlaces.
    • QuantityLengthDef

      public int QuantityLengthDef
      Default value of QuantityLength property. Default: 1. Should be overwritten by objects derived from JposDevice within the changeDefaults method.
    • QuantityLength

      public int QuantityLength
      UPOS property QuantityLength.
    • RecEmptyDef

      public boolean RecEmptyDef
      Default value of RecEmpty property. Default: false. Should be overwritten by objects derived from JposDevice whenever the status changes.
    • RecEmpty

      public boolean RecEmpty
      UPOS property RecEmpty.
    • RecNearEndDef

      public boolean RecNearEndDef
      Default value of RecNearEnd property. Default: false. Should be overwritten by objects derived from JposDevice whenever the status changes.
    • RecNearEnd

      public boolean RecNearEnd
      UPOS property RecNearEnd.
    • RemainingFiscalMemoryDef

      public int RemainingFiscalMemoryDef
      Default value of RemainingFiscalMemory property. Default: 0. Should be overwritten by objects derived from JposDevice during device open and after each Z report.
    • RemainingFiscalMemory

      public int RemainingFiscalMemory
      UPOS property RemainingFiscalMemory.
    • ReservedWord

      public String ReservedWord
      UPOS property ReservedWord. Default: "". Should be overwritten by objects derived from JposDevice within the changeDefaults method if CapReservedWord is true.
    • SlpEmptyDef

      public boolean SlpEmptyDef
      Default value of SlpEmpty property. Default: false. Should be overwritten by objects derived from JposDevice whenever the status changes.
    • SlpEmpty

      public boolean SlpEmpty
      UPOS property SlpEmpty.
    • SlpNearEndDef

      public boolean SlpNearEndDef
      Default value of SlpNearEnd property. Default: false. Should be overwritten by objects derived from JposDevice whenever the status changes.
    • SlpNearEnd

      public boolean SlpNearEnd
      UPOS property SlpNearEnd.
    • SlipSelection

      public int SlipSelection
      UPOS property SlipSelection.
    • TotalizerType

      public int TotalizerType
      UPOS property TotalizerType.
    • TrainingModeActiveDef

      public boolean TrainingModeActiveDef
      Default value of TrainingModeActive property. Default: false. Should be overwritten by objects derived from JposDevice before first enable and after method calls BeginTraining and EndTraining.
    • TrainingModeActive

      public boolean TrainingModeActive
      UPOS property TrainingModeActive.
    • CurrencyStringWithDecimalPoint

      public boolean CurrencyStringWithDecimalPoint
      Specified whether string values representing a currency value will be stored with decimal point. Default: true. For example, a currency value of 12.23, internally stored as 123400, will have a string representation of "12.34" if CurrencyStringWithDecimalPoint is true and a string representation of "123400" otherwise.
  • Constructor Details

    • FiscalPrinterProperties

      public FiscalPrinterProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • checkProperties

      public void checkProperties(jpos.config.JposEntry entry) throws jpos.JposException
      Description copied from class: JposCommonProperties
      Checks jpos entries for service specific jpos property values and set corresponding service values.
      Overrides:
      checkProperties in class JposCommonProperties
      Parameters:
      entry - JposEntry instance that contains all jpos properties for the device. Only service specific entries are of interest here, device specific entries should be processed by the corresponding checkProperties method of the device implementation derived from JposDevice.
      Throws:
      jpos.JposException - a service related property is invalid or a mandatory service related property is missing.
    • initOnOpen

      public void initOnOpen()
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during open.
      Overrides:
      initOnOpen in class JposCommonProperties
    • initOnFirstEnable

      public boolean initOnFirstEnable()
      Description copied from class: JposCommonProperties
      Initialize properties that must be initialized whenever the device will be enabled the first time-
      Overrides:
      initOnFirstEnable in class JposCommonProperties
      Returns:
      Returns true in case of first enable.
    • initOnClaim

      public void initOnClaim()
      Description copied from class: JposCommonProperties
      Initialize properties that must be initialized whenever the device will be claimed.
      Overrides:
      initOnClaim in class JposCommonProperties
    • initOnEnable

      public void initOnEnable(boolean enable)
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during deviceEnable.
      Overrides:
      initOnEnable in class JposCommonProperties
      Parameters:
      enable - True: initialize properties, false: do nothing
    • clearOutput

      public void clearOutput() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Clear output processing. Removes all OutputCompleteEvents and ErrorEvents from event queue and sets State to S_IDLE. Clears all outstanding commands of the given property set as well. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • ExclusiveUse equals ExclusiveYes: Device is claimed.
      Specified by:
      clearOutput in interface JposBaseInterface
      Overrides:
      clearOutput in class JposCommonProperties
      Throws:
      jpos.JposException - See UPOS specification, method ClearOutput
    • additionalHeader

      public void additionalHeader(String header) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      additionalHeader in interface FiscalPrinterInterface
      Parameters:
      header - Additional header line to be printer in header of next receipt.
      Throws:
      jpos.JposException - If an error occurs.
    • additionalTrailer

      public void additionalTrailer(String trailer) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      additionalTrailer in interface FiscalPrinterInterface
      Parameters:
      trailer - Additional header line to be printer in header of next receipt.
      Throws:
      jpos.JposException - If an error occurs.
    • changeDue

      public void changeDue(String changeDue) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      changeDue in interface FiscalPrinterInterface
      Parameters:
      changeDue - Text for cash return.
      Throws:
      jpos.JposException - If an error occurs.
    • checkTotal

      public void checkTotal(boolean check) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      checkTotal in interface FiscalPrinterInterface
      Parameters:
      check - true if application and printer total must match, false otherwise.
      Throws:
      jpos.JposException - If an error occurs.
    • contractorId

      public void contractorId(int id) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      contractorId in interface FiscalPrinterInterface
      Parameters:
      id - One of CID_FIRST, CID_SECOND or CID_SINGLE.
      Throws:
      jpos.JposException - If an error occurs.
    • dateType

      public void dateType(int type) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      dateType in interface FiscalPrinterInterface
      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

      public void duplicateReceipt(boolean yes) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      duplicateReceipt in interface FiscalPrinterInterface
      Parameters:
      yes - true if service can store printer commands for generation of fiscal receipt duplication.
      Throws:
      jpos.JposException - If an error occurs.
    • fiscalReceiptStation

      public void fiscalReceiptStation(int station) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      fiscalReceiptStation in interface FiscalPrinterInterface
      Parameters:
      station - One of RS_RECEIPT or RS_SLIP.
      Throws:
      jpos.JposException - If an error occurs.
    • fiscalReceiptType

      public void fiscalReceiptType(int type) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      fiscalReceiptType in interface FiscalPrinterInterface
      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

      public void messageType(int type) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      messageType in interface FiscalPrinterInterface
      Parameters:
      type - One of the values listed in the UPOS specification for property MessageType.
      Throws:
      jpos.JposException - If an error occurs.
    • postLine

      public void postLine(String text) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      postLine in interface FiscalPrinterInterface
      Parameters:
      text - Text to be printed after next item line.
      Throws:
      jpos.JposException - If an error occurs.
    • preLine

      public void preLine(String text) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      preLine in interface FiscalPrinterInterface
      Parameters:
      text - Text to be printed before next item line.
      Throws:
      jpos.JposException - If an error occurs.
    • slipSelection

      public void slipSelection(int type) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      slipSelection in interface FiscalPrinterInterface
      Parameters:
      type - One of SS_FULL_LENGTH or SS_VALIDATION.
      Throws:
      jpos.JposException - If an error occurs.
    • totalizerType

      public void totalizerType(int type) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      totalizerType in interface FiscalPrinterInterface
      Parameters:
      type - One of TT_DOCUMENT, TT_DAY, TT_RECEIPT or TT_GRAND.
      Throws:
      jpos.JposException - If an error occurs.
    • beginFiscalDocument

      public void beginFiscalDocument(int documentAmount) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginFiscalDocument in interface FiscalPrinterInterface
      Parameters:
      documentAmount - Amount of document to be stored by the Fiscal Printer.
      Throws:
      jpos.JposException - If an error occurs.
    • beginFiscalReceipt

      public void beginFiscalReceipt(boolean printHeader) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginFiscalReceipt in interface FiscalPrinterInterface
      Parameters:
      printHeader - Indicates if the header lines are to be printed at this time.
      Throws:
      jpos.JposException - If an error occurs.
    • beginFixedOutput

      public void beginFixedOutput(int station, int documentType) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginFixedOutput in interface FiscalPrinterInterface
      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

      public void beginInsertion(int timeout) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginInsertion in interface FiscalPrinterInterface
      Parameters:
      timeout - The timeout parameter gives the number of milliseconds.
      Throws:
      jpos.JposException - If an error occurs.
    • beginItemList

      public void beginItemList(int vatID) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginItemList in interface FiscalPrinterInterface
      Parameters:
      vatID - Vat identifier for reporting.
      Throws:
      jpos.JposException - If an error occurs.
    • beginNonFiscal

      public void beginNonFiscal() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginNonFiscal in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • beginRemoval

      public void beginRemoval(int timeout) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginRemoval in interface FiscalPrinterInterface
      Parameters:
      timeout - The timeout parameter gives the number of milliseconds.
      Throws:
      jpos.JposException - If an error occurs.
    • beginTraining

      public void beginTraining() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      beginTraining in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • clearError

      public void clearError() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      clearError in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endFiscalDocument

      public void endFiscalDocument() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endFiscalDocument in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endFiscalReceipt

      public void endFiscalReceipt(boolean printHeader) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endFiscalReceipt in interface FiscalPrinterInterface
      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

      public void endFixedOutput() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endFixedOutput in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endInsertion

      public void endInsertion() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endInsertion in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endItemList

      public void endItemList() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endItemList in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endNonFiscal

      public void endNonFiscal() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endNonFiscal in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endRemoval

      public void endRemoval() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endRemoval in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endTraining

      public void endTraining() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      endTraining in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • getData

      public void getData(int dataItem, int[] optArgs, String[] data) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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".
      Specified by:
      getData in interface FiscalPrinterInterface
      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

      public void getData(int dataItem, int[] optArgs, int[] data) throws jpos.JposException
      Default implementation for backward compatibility. Must not be called from real implementation in derived class.
      Specified by:
      getData in interface FiscalPrinterInterface
      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 the specified data item does not specify an integer value.
    • getData

      public void getData(int dataItem, int[] optArgs, long[] data) throws jpos.JposException
      Default implementation for backward compatibility. Must not be called from real implementation in derived class.
      Specified by:
      getData in interface FiscalPrinterInterface
      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 the specified data item does not specify a currency value.
    • getDate

      public void getDate(String[] date) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      getDate in interface FiscalPrinterInterface
      Parameters:
      date - Date and time returned as a string.
      Throws:
      jpos.JposException - If an error occurs.
    • getTotalizer

      @Deprecated public void getTotalizer(int vatID, int optArgs, String[] data) throws jpos.JposException
      Deprecated.
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      getTotalizer in interface FiscalPrinterInterface
      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

      public void getTotalizer(int vatID, int optArgs, long[] data) throws jpos.JposException
      This is a dummy implementation that calls the deprecated version this method.
      Specified by:
      getTotalizer in interface FiscalPrinterInterface
      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
    • getVatEntry

      public void getVatEntry(int vatID, int optArgs, int[] vatRate) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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,
      Specified by:
      getVatEntry in interface FiscalPrinterInterface
      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

      public void printDuplicateReceipt() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printDuplicateReceipt in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • printPeriodicTotalsReport

      public void printPeriodicTotalsReport(String date1, String date2) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printPeriodicTotalsReport in interface FiscalPrinterInterface
      Parameters:
      date1 - Starting date of report to print.
      date2 - Ending date of report to print.
      Throws:
      jpos.JposException - If an error occurs.
    • printPowerLossReport

      public void printPowerLossReport() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printPowerLossReport in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • printReport

      public void printReport(int reportType, String startNum, String endNum) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printReport in interface FiscalPrinterInterface
      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

      public void printXReport() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printXReport in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • printZReport

      public void printZReport() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printZReport in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • resetPrinter

      public void resetPrinter() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      resetPrinter in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • setCurrency

      public void setCurrency(int newCurrency) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setCurrency in interface FiscalPrinterInterface
      Parameters:
      newCurrency - The new currency.
      Throws:
      jpos.JposException - If an error occurs.
    • setDate

      public void setDate(String date) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setDate in interface FiscalPrinterInterface
      Parameters:
      date - Date and time as a string.
      Throws:
      jpos.JposException - If an error occurs.
    • setHeaderLine

      public void setHeaderLine(int lineNumber, String text, boolean doubleWidth) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setHeaderLine in interface FiscalPrinterInterface
      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

      public void setPOSID(String POSID, String cashierID) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setPOSID in interface FiscalPrinterInterface
      Parameters:
      POSID - Identifier for the POS system.
      cashierID - Identifier of the current cashier.
      Throws:
      jpos.JposException - If an error occurs.
    • setStoreFiscalID

      public void setStoreFiscalID(String ID) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setStoreFiscalID in interface FiscalPrinterInterface
      Parameters:
      ID - Fiscal identifier.
      Throws:
      jpos.JposException - If an error occurs.
    • setTrailerLine

      public void setTrailerLine(int lineNumber, String text, boolean doubleWidth) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setTrailerLine in interface FiscalPrinterInterface
      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

      public void setVatTable() throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setVatTable in interface FiscalPrinterInterface
      Throws:
      jpos.JposException - If an error occurs.
    • setVatValue

      public void setVatValue(int vatID, long vatValue) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setVatValue in interface FiscalPrinterInterface
      Parameters:
      vatID - Index of the VAT table entry to set.
      vatValue - Tax value as a percentage.
      Throws:
      jpos.JposException - If an error occurs.
    • setVatValue

      public void setVatValue(int vatID, int optArgs, int vatValue) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      setVatValue in interface FiscalPrinterInterface
      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

      public void verifyItem(String itemName, int vatID) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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" ...
      Specified by:
      verifyItem in interface FiscalPrinterInterface
      Parameters:
      itemName - Item to be verified.
      vatID - VAT identifier of the item.
      Throws:
      jpos.JposException - If an error occurs.
    • printFiscalDocumentLine

      public PrintFiscalDocumentLine printFiscalDocumentLine(String documentLine) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printFiscalDocumentLine in interface FiscalPrinterInterface
      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

      public void printFiscalDocumentLine(PrintFiscalDocumentLine request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printFiscalDocumentLine in interface FiscalPrinterInterface
      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

      public PrintFixedOutput printFixedOutput(int documentType, int lineNumber, String data) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printFixedOutput in interface FiscalPrinterInterface
      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

      public void printFixedOutput(PrintFixedOutput request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printFixedOutput in interface FiscalPrinterInterface
      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

      public PrintNormal printNormal(int station, String data) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printNormal in interface FiscalPrinterInterface
      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

      public void printNormal(PrintNormal request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printNormal in interface FiscalPrinterInterface
      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

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

      public void printRecCash(PrintRecCash request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecCash in interface FiscalPrinterInterface
      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

      public PrintRecItem printRecItem(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItem in interface FiscalPrinterInterface
      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

      public void printRecItem(PrintRecItem request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItem in interface FiscalPrinterInterface
      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

      public PrintRecItemAdjustment printRecItemAdjustment(int adjustmentType, String description, long amount, int vatInfo) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemAdjustment in interface FiscalPrinterInterface
      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

      public void printRecItemAdjustment(PrintRecItemAdjustment request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemAdjustment in interface FiscalPrinterInterface
      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

      public PrintRecItemAdjustmentVoid printRecItemAdjustmentVoid(int adjustmentType, String description, long amount, int vatInfo) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemAdjustmentVoid in interface FiscalPrinterInterface
      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

      public void printRecItemAdjustmentVoid(PrintRecItemAdjustmentVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemAdjustmentVoid in interface FiscalPrinterInterface
      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

      public PrintRecItemFuel printRecItemFuel(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName, long specialTax, String specialTaxName) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemFuel in interface FiscalPrinterInterface
      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

      public void printRecItemFuel(PrintRecItemFuel request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemFuel in interface FiscalPrinterInterface
      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

      public PrintRecItemFuelVoid printRecItemFuelVoid(String description, long price, int vatInfo, long specialTax) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemFuelVoid in interface FiscalPrinterInterface
      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

      public void printRecItemFuelVoid(PrintRecItemFuelVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemFuelVoid in interface FiscalPrinterInterface
      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

      public PrintRecItemVoid printRecItemVoid(String description, long price, int quantity, int vatInfo, long unitPrice, String unitName) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemVoid in interface FiscalPrinterInterface
      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

      public void printRecItemVoid(PrintRecItemVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemVoid in interface FiscalPrinterInterface
      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

      public PrintRecItemRefund printRecItemRefund(String description, long amount, int quantity, int vatInfo, long unitAmount, String unitName) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemRefund in interface FiscalPrinterInterface
      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

      public void printRecItemRefund(PrintRecItemRefund request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemRefund in interface FiscalPrinterInterface
      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

      public PrintRecItemRefundVoid printRecItemRefundVoid(String description, long amount, int quantity, int vatInfo, long unitAmount, String unitName) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemRefundVoid in interface FiscalPrinterInterface
      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

      public void printRecItemRefundVoid(PrintRecItemRefundVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecItemRefundVoid in interface FiscalPrinterInterface
      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

      public PrintRecMessage printRecMessage(String message) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecMessage in interface FiscalPrinterInterface
      Parameters:
      message - Text message to print.
      Returns:
      PrintRecMessage object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • printRecMessage

      public void printRecMessage(PrintRecMessage request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecMessage in interface FiscalPrinterInterface
      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

      public PrintRecNotPaid printRecNotPaid(String description, long amount) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecNotPaid in interface FiscalPrinterInterface
      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

      public void printRecNotPaid(PrintRecNotPaid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecNotPaid in interface FiscalPrinterInterface
      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 public PrintRecPackageAdjustment printRecPackageAdjustment(int adjustmentType, String description, String vatAdjustment) throws jpos.JposException
      Deprecated.
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecPackageAdjustment in interface FiscalPrinterInterface
      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

      public PrintRecPackageAdjustment printRecPackageAdjustment(int adjustmentType, String description, String vatAdjustment, Map<Integer,​Number> parsedAdjustments) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecPackageAdjustment in interface FiscalPrinterInterface
      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

      public void printRecPackageAdjustment(PrintRecPackageAdjustment request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecPackageAdjustment in interface FiscalPrinterInterface
      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 public PrintRecPackageAdjustVoid printRecPackageAdjustVoid(int adjustmentType, String vatAdjustment) throws jpos.JposException
      Deprecated.
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecPackageAdjustVoid in interface FiscalPrinterInterface
      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

      public PrintRecPackageAdjustVoid printRecPackageAdjustVoid(int adjustmentType, String vatAdjustment, Map<Integer,​Number> parsedAdjustments) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecPackageAdjustVoid in interface FiscalPrinterInterface
      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

      public void printRecPackageAdjustVoid(PrintRecPackageAdjustVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecPackageAdjustVoid in interface FiscalPrinterInterface
      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

      public PrintRecRefund printRecRefund(String description, long amount, int vatInfo) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecRefund in interface FiscalPrinterInterface
      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

      public void printRecRefund(PrintRecRefund request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecRefund in interface FiscalPrinterInterface
      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

      public PrintRecRefundVoid printRecRefundVoid(String description, long amount, int vatInfo) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecRefundVoid in interface FiscalPrinterInterface
      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

      public void printRecRefundVoid(PrintRecRefundVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecRefundVoid in interface FiscalPrinterInterface
      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

      public PrintRecSubtotal printRecSubtotal(long amount) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecSubtotal in interface FiscalPrinterInterface
      Parameters:
      amount - Price of the line item.
      Returns:
      PrintRecSubtotal object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • printRecSubtotal

      public void printRecSubtotal(PrintRecSubtotal request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecSubtotal in interface FiscalPrinterInterface
      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

      public PrintRecSubtotalAdjustment printRecSubtotalAdjustment(int adjustmentType, String description, long amount) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecSubtotalAdjustment in interface FiscalPrinterInterface
      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

      public void printRecSubtotalAdjustment(PrintRecSubtotalAdjustment request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecSubtotalAdjustment in interface FiscalPrinterInterface
      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

      public PrintRecSubtotalAdjustVoid printRecSubtotalAdjustVoid(int adjustmentType, long amount) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecSubtotalAdjustVoid in interface FiscalPrinterInterface
      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

      public void printRecSubtotalAdjustVoid(PrintRecSubtotalAdjustVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecSubtotalAdjustVoid in interface FiscalPrinterInterface
      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

      public PrintRecTaxID printRecTaxID(String taxId) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecTaxID in interface FiscalPrinterInterface
      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

      public void printRecTaxID(PrintRecTaxID request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecTaxID in interface FiscalPrinterInterface
      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

      public PrintRecTotal printRecTotal(long total, long payment, String description) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecTotal in interface FiscalPrinterInterface
      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

      public void printRecTotal(PrintRecTotal request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecTotal in interface FiscalPrinterInterface
      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

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

      public void printRecVoid(PrintRecVoid request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecVoid in interface FiscalPrinterInterface
      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

      public PrintRecVoidItem printRecVoidItem(String description, long price, int quantity, int adjustmentType, long adjustment, int vatInfo) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecVoidItem in interface FiscalPrinterInterface
      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

      public void printRecVoidItem(PrintRecVoidItem request) throws jpos.JposException
      Description copied from interface: FiscalPrinterInterface
      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.
      Specified by:
      printRecVoidItem in interface FiscalPrinterInterface
      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.