Class cmdReceipt.FiscalReceipt

java.lang.Object
com.datecs.fiscalprinter.SDK.model.DatecsFiscalDevice
com.datecs.fiscalprinter.SDK.model.UserLayerV1.cmdReceipt
com.datecs.fiscalprinter.SDK.model.UserLayerV1.cmdReceipt.FiscalReceipt
Direct Known Subclasses:
cmdReceipt.FiscalReceipt.FiscalSale, cmdReceipt.FiscalReceipt.Storno
Enclosing class:
cmdReceipt

public static class cmdReceipt.FiscalReceipt
extends cmdReceipt
Fiscal receipt
  • Constructor Details

    • FiscalReceipt

      public FiscalReceipt​(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb)
      Receipt constructor
      Parameters:
      opCode - Operator number
      opPwd - Operator password, ascii string of digits.
      tillNmb - Number of point of sale from 1...99999;
    • FiscalReceipt

      public FiscalReceipt​(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb, java.lang.String unp)
      Receipt constructor
      Parameters:
      opCode - Operator number / 1 to 16 /
      opPwd - Operator password, ascii string of digits. Lenght from 4...8;
      tillNmb - Number of point of sale from 1...99999;
      unp - - Unique sales number (format: serial number of the fiscal device "-" four digits or Latin letters "-" serial number of the sale (seven digits with leading zeros) "example: DT000600-OP01-0001000). Before the first sale, the UNP should be set at least once if then the parameter will be incremented by the number of the sale automatically.
    • FiscalReceipt

      public FiscalReceipt()
  • Method Details

    • openFiscalReceipt

      public int openFiscalReceipt​(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb, java.lang.String unp) throws java.lang.Exception
      Open fiscal receipt
      Parameters:
      opCode -
      opPwd -
      tillNmb -
      unp -
      Returns:
      All issued fiscal receipt since the last Z report.
      Throws:
      java.lang.Exception
    • openFiscalReceipt

      public int openFiscalReceipt() throws java.lang.Exception
      Open fiscal receipt
      Returns:
      All issued fiscal receipt since the last Z report.
      Throws:
      java.lang.Exception
    • closeFiscalReceipt

      public int closeFiscalReceipt() throws java.lang.Exception
      Close fiscal receipt
      Returns:
      All issued fiscal receipt since the last Z report.
      Throws:
      java.lang.Exception
    • openInvoice

      public int openInvoice​(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb, java.lang.String unp) throws java.lang.Exception
      Open Invoice receipt
      Parameters:
      opCode - Operator number / 1 to 16 /
      opPwd - Operator password, ascii string of digits. Lenght from 4...8;
      tillNmb - Number of point of sale from 1...99999;
      unp -
      Returns:
      All issued fiscal receipt since the last Z report.
      Throws:
      java.lang.Exception
    • isInvoice

      public boolean isInvoice() throws java.lang.Exception
      Returns:
      true if CURRENT RECEIPT is INVOICE
      Throws:
      java.lang.Exception
    • isOpen

      public boolean isOpen() throws java.lang.Exception
      Check for openFiscalReceipt fiscal receipt through status bits
      Returns:
      true if receipt is open
      Throws:
      java.lang.Exception
    • cancel

      public boolean cancel() throws java.lang.Exception
      cancel fiscal receipt
      Returns:
      true if canceled
      Throws:
      java.lang.Exception
    • getLastUNP

      public java.lang.String getLastUNP() throws java.lang.Exception
      Returns:
      sequential sales number UNP from the the last one issued fiscal receipt
      Throws:
      java.lang.Exception
    • getNextFiscReceipt

      public int getNextFiscReceipt() throws java.lang.Exception
      Returns:
      Number of next fiscal receipt
      Throws:
      java.lang.Exception
    • getLastDocNumber

      public java.lang.String getLastDocNumber() throws java.lang.Exception
      Returns:
      NUMBER OF THE LAST PRINTED DOCUMENT
      Throws:
      java.lang.Exception
    • getOpCode

      public java.lang.String getOpCode()
      Returns:
      Current operator number from 1...30;
    • setOpCode

      public void setOpCode​(java.lang.String opCode)
      Parameters:
      opCode - operator number from 1...30;
    • getOpPwd

      public java.lang.String getOpPwd()
      Returns:
      Current operator password, ascii string of digits. Lenght from 1...8;
    • setOpPwd

      public void setOpPwd​(java.lang.String opPwd)
      Parameters:
      opPwd - Operator password, ascii string of digits. Lenght from 1...8;
    • getTillNmb

      public java.lang.String getTillNmb()
      Returns:
      Current number of point of sale from 1...99999;
    • setTillNmb

      public void setTillNmb​(java.lang.String tillNmb)
      Parameters:
      tillNmb - number of point of sale from 1...99999;
    • getAllreceipt

      public java.lang.String getAllreceipt()
      Returns:
      The number of all issued receipt (fiscal and non-fiscal) in current Z-period The value is filled in after the issue of each receipt
    • getFiscReceipt

      public java.lang.String getFiscReceipt()
      Returns:
      The number of all issued receipt (fiscal) in current Z-period The value is filled in after the issue of each receipt
    • printFreeText

      public void printFreeText​(java.lang.String s) throws java.lang.Exception
      Printing of a free fiscal text
      Parameters:
      s - text of 0...XX symbols, XX = PrintColumns-2;
      Throws:
      java.lang.Exception
    • printFreeText

      public void printFreeText​(java.lang.String text, boolean Bold, boolean DoubleH, boolean Italic, cmdReceipt.FiscalReceipt.FreeFiscalTextType font) throws java.lang.Exception
      Printing of a free fiscal text with text attributes
      Parameters:
      text - text of 0...XX symbols, XX = PrintColumns-2;
      Bold -
      Italic -
      DoubleH -
      font - 0 32dpi 4 mm High 1 32dpi 4 mm High) 2 24dpi 3 mm High 3 16dpi 2 mm High
      Throws:
      java.lang.Exception - Note: Bold, Italic, DoubleH - Not supported on DP-05, DP-25, DP-35, WP-50, DP-150
    • paperFeed

      public void paperFeed​(int linesToFeed) throws java.lang.Exception
      Paper feed
      Parameters:
      linesToFeed - - Number of lines to feed from 1 to 99. Default: 1;
      Throws:
      FiscalException
      java.io.IOException
      java.lang.Exception
    • paperCutting

      public void paperCutting() throws java.lang.Exception
      Paper cutting
      Throws:
      java.lang.Exception
    • cashInCashOut

      public java.lang.Double[] cashInCashOut​(java.lang.Double dAmount) throws java.lang.Exception
      Parameters:
      dAmount - the sum ( 0.00...9999999.99 or 0...999999999 depending dec point position ); If Amount=0, the only Answer is returned, and receipt does not print.
      Returns:
      - Double array 0-"cashSum" 1-"cashIn" 2-"cashOut"
      Throws:
      java.lang.Exception
    • printSeparatingLine

      public void printSeparatingLine​(cmdReceipt.SeparatingLine separatingLine) throws java.lang.Exception
      Printing Separating Line as text
      Throws:
      java.lang.Exception
    • drawerKickOut

      public void drawerKickOut​(java.lang.String timeout) throws java.lang.Exception
      Command: 106 (6Ah) Drawer opening
      Throws:
      java.lang.Exception