Class cmdReceipt.FiscalSale

java.lang.Object
Enclosing class:
cmdReceipt

public static class cmdReceipt.FiscalSale
extends cmdReceipt
Class of the sale process and the transactions associated with it
  • Constructor Details

    • FiscalSale

      public FiscalSale()
    • FiscalSale

      public FiscalSale​(java.lang.String pluName, java.lang.String taxCd, java.lang.String price, java.lang.String quantity, java.lang.String department)
      Constructor with Mandatory parameters:
      Parameters:
      pluName - Name of product, up to 72 characters not empty string;
      taxCd - Tax code; 1,2,3...8
      price - Product price, with sign '-' at void operations. Format: 2 decimals; up to *9999999.99
      quantity - Quantity of the product ( default: 1.000 ); Format: 3 decimals; up to *999999.999
      department - Number of the department 0..99; If '0' - Without department;
    • FiscalSale

      public FiscalSale​(java.lang.String pluName, java.lang.String taxCd, java.lang.String price, java.lang.String quantity, cmdReceipt.FiscalSale.DiscountType discountType, java.lang.String discountValue, java.lang.String department, java.lang.String unit)
      Constructor with All parameters:
      Parameters:
      pluName - Name of product, up to 72 characters not empty string;
      taxCd - Tax code; 1,2,3...8
      price - Product price, with sign '-' at void operations. Format: 2 decimals; up to *9999999.99
      quantity - Quantity of the product ( default: 1.000 ); Format: 3 decimals; up to *999999.999
      discountType - - type of discount. noDiscount, surchargePercentage, discountPercentage, surchargeSum, discountSum
      discountValue - - value of discount. a number from 0.01 to 9999999.99 for sum operations; a number from 0.01 to 99.99 for percentage operations;
      department - Number of the department 0..99; If '0' - Without department;
      unit - Unit name, up to 6 characters not empty string;
    • FiscalSale

      public FiscalSale​(java.lang.String pluName, java.lang.String taxCd, java.lang.String price)
  • Method Details

    • addByPLU

      public int addByPLU​(java.lang.String pluCode, java.lang.String quantity, java.lang.String price, cmdReceipt.FiscalSale.DiscountType discountType, java.lang.String discountValue) throws java.lang.Exception
      Registering the sale of a programmed item
      Parameters:
      pluCode - The code of the item. from 1 to MAX_PLU. MAX_PLU: ECR-100000, Printer-3000;
      price - Product price, with sign '-' at void operations. Format: 2 decimals; up to *9999999.99
      quantity - Quantity of the product ( default: 1.000 ); Format: 3 decimals; up to *999999.999
      discountType - - type of discount. noDiscount, surchargePercentage, discountPercentage, surchargeSum, discountSum
      discountValue - - value of discount. a number from 0.01 to 9999999.99 for sum operations; a number from 0.01 to 99.99 for percentage operations;
      Returns:
      - Current slip number (1...9999999);
      Throws:
      java.lang.Exception
    • addWithUnit

      public cmdReceipt.FiscalSale addWithUnit() throws java.lang.Exception
      Registration of free sale ,parameters are set in the constructor.
      Returns:
      Instance to Fiscal Sale
      Throws:
      java.lang.Exception
    • add

      public cmdReceipt.FiscalSale add() throws java.lang.Exception
      Registration of free sale ,parameters are set in the constructor.
      Returns:
      Instance to Fiscal Sale
      Throws:
      java.lang.Exception
    • add

      public cmdReceipt.FiscalSale add​(java.lang.String pluName, java.lang.String taxCd, java.lang.String department, java.lang.String price, java.lang.String quantity, cmdReceipt.FiscalSale.DiscountType discountType, java.lang.String discountValue, java.lang.String unit) throws java.lang.Exception
      Registration of free sale with all parameters
      Parameters:
      pluName - Name of product, up to 72 characters not empty string;
      taxCd - Tax code; 1,2,3...8
      price - Product price, with sign '-' at void operations. Format: 2 decimals; up to *9999999.99
      quantity - Quantity of the product ( default: 1.000 ); Format: 3 decimals; up to *999999.999
      discountType - - type of discount. noDiscount, surchargePercentage, discountPercentage, surchargeSum, discountSum
      discountValue - - value of discount. a number from 0.01 to 9999999.99 for sum operations; a number from 0.01 to 99.99 for percentage operations;
      department - Number of the department 0..99; If '0' - Without department;
      unit - Unit name, up to 6 characters not empty string;
      Returns:
      Instance to Fiscal Sale
      Throws:
      java.lang.Exception
    • add

      public cmdReceipt.FiscalSale add​(java.lang.String pluName, java.lang.String taxCd, java.lang.String dept, java.lang.String price, java.lang.String qwan, cmdReceipt.FiscalSale.DiscountType discountType, java.lang.String discValueStr) throws java.lang.Exception
      Registration of free sale with discount, Without department and quantity is 1
      Parameters:
      pluName - Name of product, up to 72 characters not empty string;
      taxCd - Tax code; 1,2,3...8
      price - Product price, with sign '-' at void operations. Format: 2 decimals; up to *9999999.99*
      discountType - - type of discount. noDiscount, surchargePercentage, discountPercentage, surchargeSum, discountSum
      Returns:
      Instance to Fiscal Sale
      Throws:
      java.lang.Exception
    • readSubtotal

      public java.lang.String readSubtotal​(boolean display, cmdReceipt.FiscalSale.DiscountType discountType, java.lang.String discountValue) throws java.lang.Exception
      readSubtotal -

      Returns the current subtotal on the Fiscal Receipt, if there is a correction (surcharge, discount) it will affect to the amount! After the execution of readSubtotal or printSubtotal, it is forbidden to add items to the fiscal receipt!

      Returns ot this method is identical to FiscalTransaction getAmountAsString. Use FiscalTransaction.getAmountAsString to add items after the calculation.

      Parameters:
      display - - to customer display
      discountType - - type of discount. noDiscount -no discount; surchargePercentage - surcharge by percentage; discountPercentage - discount by percentage; surchargeSum - surcharge by sum; discountSum - discount by sum;
      discountValue - value of discount. a number from 0.00 to 21474836.47 for sum operations; a number from 0.00 to 99.99 for percentage operations; If {DiscountType} is zero or empty, this parameter must be empty
      Returns:
      subtotal of the receipt ( 0.00...9999999.99 or 0...999999999 depending dec point position );
      Throws:
      java.lang.Exception
    • printSubtotal

      public java.lang.String printSubtotal​(boolean display, cmdReceipt.FiscalSale.DiscountType discountType, java.lang.String discountValue) throws java.lang.Exception
      printSubtotal - Printing the current subtotal on the Fiscal Receipt, if there is a correction (surcharge, discount) it will affect to the amount! After the execution of this method, it is forbidden to add items to the fiscal receipt!
      Parameters:
      display - - to customer display
      discountType - - type of discount. noDiscount -no discount; surchargePercentage - surcharge by percentage; discountPercentage - discount by percentage; surchargeSum - surcharge by sum; discountSum - discount by sum;
      discountValue - value of discount. a number from 0.00 to 21474836.47 for sum operations; a number from 0.00 to 99.99 for percentage operations; If {DiscountType} is zero or empty, this parameter must be empty
      Returns:
      subtotal of the receipt ( 0.00...9999999.99 or 0...999999999 depending dec point position );
      Throws:
      java.lang.Exception
    • saleTotal

      public void saleTotal​(cmdReceipt.PaymentType paymentType, java.lang.String tenderAmount) throws java.lang.Exception
      Payments and calculation of the total sum with current currency;
      Parameters:
      paymentType - - Type of payment; cash, credit_card, debit_card, other_pay3, other_pay4, other_pay5
      tenderAmount - - Amount to pay ( 0.00...9999999.99 or 0...999999999 depending dec point position );
      Throws:
      java.lang.Exception
    • saleTotalDebitCard

      public void saleTotalDebitCard​(java.lang.String tenderAmount, cmdReceipt.FiscalSale.TypeOfCardPayment typeOfCardPayment) throws java.lang.Exception
      Payments and calculation of the total sum with card payment. Only for payment with debit card - with PinPad connected !
      Parameters:
      tenderAmount - - Amount to pay ( 0.00...9999999.99 or 0...999999999 depending dec point position );
      typeOfCardPayment - - Type of card payment. Only for payment with debit card; - with money; - with points from loyal scheme;
      Throws:
      java.lang.Exception
    • saleTotalForeignCurrency

      public void saleTotalForeignCurrency​(java.lang.String tenderAmount, cmdReceipt.FiscalSale.TypeOfChange typeOfChange) throws java.lang.Exception
      Payments and calculation of the total sum with Foreign currency. Only for payment with debit card - with PinPad connected !
      Parameters:
      tenderAmount -
      typeOfChange - - Type of change currentCurrency, foreignCurrency
      tenderAmount - - Amount to pay ( 0.00...9999999.99 or 0...999999999 depending dec point position );
      Throws:
      java.lang.Exception