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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classcmdReceipt.FiscalReceipt.FiscalSaleClass of the sale process and the transactions associated with itstatic classcmdReceipt.FiscalReceipt.FiscalTransactionstatic classcmdReceipt.FiscalReceipt.FreeFiscalTextTypestatic classcmdReceipt.FiscalReceipt.StornoClass handles storno fiscal receiptNested classes/interfaces inherited from class com.datecs.fiscalprinter.SDK.model.UserLayerV1.cmdReceipt
cmdReceipt.BarcodeType, cmdReceipt.FiscalReceipt, cmdReceipt.InvoiceClientInfo, cmdReceipt.NonFiscalReceipt, cmdReceipt.PaidMode, cmdReceipt.SeparatingLine, cmdReceipt.TotalResult -
Constructor Summary
Constructors Constructor Description FiscalReceipt()FiscalReceipt(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb)Receipt constructorFiscalReceipt(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb, java.lang.String unp)Receipt constructor -
Method Summary
Modifier and Type Method Description booleancancel()cancel fiscal receiptjava.lang.Double[]cashInCashOut(java.lang.Double dAmount)intcloseFiscalReceipt()Close fiscal receiptvoiddrawerKickOut(java.lang.String timeout)Command: 106 (6Ah) Drawer openingjava.lang.StringgetAllreceipt()java.lang.StringgetFiscReceipt()java.lang.StringgetLastDocNumber()java.lang.StringgetLastUNP()intgetNextFiscReceipt()java.lang.StringgetOpCode()java.lang.StringgetOpPwd()java.lang.StringgetTillNmb()booleanisInvoice()booleanisOpen()Check for openFiscalReceipt fiscal receipt through status bitsintopenFiscalReceipt()Open fiscal receiptintopenFiscalReceipt(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb, java.lang.String unp)Open fiscal receiptintopenInvoice(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb, java.lang.String unp)Open Invoice receiptvoidpaperCutting()Paper cuttingvoidpaperFeed(int linesToFeed)Paper feedvoidprintFreeText(java.lang.String s)Printing of a free fiscal textvoidprintFreeText(java.lang.String text, boolean Bold, boolean DoubleH, boolean Italic, cmdReceipt.FiscalReceipt.FreeFiscalTextType font)Printing of a free fiscal text with text attributesvoidprintSeparatingLine(cmdReceipt.SeparatingLine separatingLine)Printing Separating Line as textvoidsetOpCode(java.lang.String opCode)voidsetOpPwd(java.lang.String opPwd)voidsetTillNmb(java.lang.String tillNmb)Methods inherited from class com.datecs.fiscalprinter.SDK.model.UserLayerV1.cmdReceipt
printBarcode, setPrintBarcodeDataMethods inherited from class com.datecs.fiscalprinter.SDK.model.DatecsFiscalDevice
checkErrorCode, close, getConnectedECRV1, getConnectedModelV2, getConnectedPrinterV1, getCountryCode, getMaxDepartments, getMaxStockGroup, isCheckLastError, isConnectedDeviceV2, isConnectedECR, isConnectedPrinter, isEditItemPrice, isEditItemQTY, isFontSupported, isPaperCuttingDevice, setCheckLastError, setConnectedModel, setConnectedModel, setConnectedModel, setCountryCode
-
Constructor Details
-
FiscalReceipt
public FiscalReceipt(java.lang.String opCode, java.lang.String opPwd, java.lang.String tillNmb)Receipt constructor- Parameters:
opCode- Operator numberopPwd- 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.ExceptionOpen 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.ExceptionOpen fiscal receipt- Returns:
- All issued fiscal receipt since the last Z report.
- Throws:
java.lang.Exception
-
closeFiscalReceipt
public int closeFiscalReceipt() throws java.lang.ExceptionClose 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.ExceptionOpen 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.ExceptionCheck for openFiscalReceipt fiscal receipt through status bits- Returns:
- true if receipt is open
- Throws:
java.lang.Exception
-
cancel
public boolean cancel() throws java.lang.Exceptioncancel 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.ExceptionPrinting 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.ExceptionPrinting 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.ExceptionPaper feed- Parameters:
linesToFeed- - Number of lines to feed from 1 to 99. Default: 1;- Throws:
FiscalExceptionjava.io.IOExceptionjava.lang.Exception
-
paperCutting
public void paperCutting() throws java.lang.ExceptionPaper 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.ExceptionPrinting Separating Line as text- Throws:
java.lang.Exception
-
drawerKickOut
public void drawerKickOut(java.lang.String timeout) throws java.lang.ExceptionCommand: 106 (6Ah) Drawer opening- Throws:
java.lang.Exception
-