Search in sources :

Example 11 with FiscalPacket

use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.

the class HasarFiscalPrinter method cmdSetEmbarkNumber.

public FiscalPacket cmdSetEmbarkNumber(int line, String text) {
    FiscalPacket cmd = createFiscalPacket(CMD_SET_EMBARK_NUMBER);
    int i = 1;
    cmd.setNumber(i++, line, false);
    cmd.setText(i++, text, 20, false);
    return cmd;
}
Also used : FiscalPacket(ar.com.ergio.print.fiscal.FiscalPacket)

Example 12 with FiscalPacket

use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.

the class HasarFiscalPrinter method cmdSubtotal.

public FiscalPacket cmdSubtotal(boolean print, Integer display) {
    FiscalPacket cmd = createFiscalPacket(CMD_SUBTOTAL);
    int i = 1;
    cmd.setBoolean(i++, print, "P", "x", false);
    cmd.setString(i++, "x");
    cmd.setNumber(i++, display, true);
    return cmd;
}
Also used : FiscalPacket(ar.com.ergio.print.fiscal.FiscalPacket)

Example 13 with FiscalPacket

use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.

the class HasarFiscalPrinter method cmdPrintNonFiscalText.

public FiscalPacket cmdPrintNonFiscalText(String text, Integer display) {
    FiscalPacket cmd = createFiscalPacket(CMD_PRINT_NON_FISCAL_TEXT);
    int i = 1;
    cmd.setText(i++, text, 120, false);
    cmd.setNumber(i++, display, true);
    return cmd;
}
Also used : FiscalPacket(ar.com.ergio.print.fiscal.FiscalPacket)

Example 14 with FiscalPacket

use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.

the class HasarFiscalPrinter method cmdReturnRecharge.

protected FiscalPacket cmdReturnRecharge(String description, BigDecimal amount, BigDecimal ivaPercent, boolean subtract, BigDecimal internalTaxes, boolean baseAmount, Integer display, String operation, int descMaxLength) {
    FiscalPacket cmd = createFiscalPacket(CMD_RETURN_RECHARGE);
    int i = 1;
    cmd.setText(i++, description, descMaxLength, false);
    cmd.setNumber(i++, amount, 9, 2, false);
    if (ivaPercent == null) {
        ivaPercent = BigDecimal.ZERO;
    }
    cmd.setNumber(i++, ivaPercent, 2, 2, false);
    cmd.setBoolean(i++, subtract, "m", "M", false);
    cmd.setNumber(i++, internalTaxes, 6, 8, false);
    cmd.setNumber(i++, display, true);
    cmd.setBoolean(i++, baseAmount, "x", "T", false);
    cmd.setText(i++, operation, false);
    return cmd;
}
Also used : FiscalPacket(ar.com.ergio.print.fiscal.FiscalPacket)

Example 15 with FiscalPacket

use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.

the class HasarFiscalPrinter method cmdSetDateTime.

public FiscalPacket cmdSetDateTime(Date dateTime) {
    FiscalPacket cmd = createFiscalPacket(CMD_SET_DATE_TIME);
    cmd.setDateAndTime(1, 2, dateTime);
    return cmd;
}
Also used : FiscalPacket(ar.com.ergio.print.fiscal.FiscalPacket)

Aggregations

FiscalPacket (ar.com.ergio.print.fiscal.FiscalPacket)39 FiscalPrinterIOException (ar.com.ergio.print.fiscal.exception.FiscalPrinterIOException)5 Customer (ar.com.ergio.print.fiscal.document.Customer)4 Payment (ar.com.ergio.print.fiscal.document.Payment)1 FiscalPrinterStatusError (ar.com.ergio.print.fiscal.exception.FiscalPrinterStatusError)1 IOException (java.io.IOException)1 BigDecimal (java.math.BigDecimal)1