use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.
the class HasarFiscalPrinter method cmdSetFantasyName.
public FiscalPacket cmdSetFantasyName(int line, String text) {
FiscalPacket cmd = createFiscalPacket(CMD_SET_FANTASY_NAME);
int i = 1;
cmd.setNumber(i++, line, false);
cmd.setText(i++, text, 50, false);
return cmd;
}
use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.
the class HasarFiscalPrinter method cmdGeneralDiscount.
public FiscalPacket cmdGeneralDiscount(String description, BigDecimal amount, boolean substract, boolean baseAmount, Integer display) {
FiscalPacket cmd = createFiscalPacket(CMD_GENERAL_DISCOUNT);
int i = 1;
cmd.setText(i++, description, 50, false);
cmd.setNumber(i++, amount, 9, 2, false);
cmd.setBoolean(i++, substract, "m", "M", false);
cmd.setNumber(i++, display, true);
cmd.setBoolean(i++, baseAmount, "x", "T", false);
return cmd;
}
use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.
the class HasarFiscalPrinter method cmdPrintEmbarkItem.
public FiscalPacket cmdPrintEmbarkItem(String description, BigDecimal quantity, Integer display) {
FiscalPacket cmd = createFiscalPacket(CMD_PRINT_EMBARK_ITEM);
int i = 1;
cmd.setText(i++, description, 108, false);
cmd.setQuantity(i++, quantity, false);
cmd.setNumber(i++, display, true);
return cmd;
}
use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.
the class HasarFiscalPrinter method checkTaxes.
private void checkTaxes(Document document) throws FiscalPrinterStatusError, FiscalPrinterIOException {
// ////////////////////////////////////////////////////////////
// Incia la transmisiĆ³n de informaciĆ³n de IVA
// Comando: @SendFirstIVA
FiscalPacket response = execute(cmdSendFirstIVA());
BigDecimal taxRate = null;
BigDecimal taxAmount = null;
BigDecimal taxBaseAmt = null;
int type = response.getInt(3);
while (type == 1) {
// Tipo = 1 es IVA del documento
taxRate = response.getBigDecimal(4);
taxAmount = response.getBigDecimal(5);
taxBaseAmt = response.getBigDecimal(8);
System.out.println("- IVA: " + taxRate + ", Importe: " + taxAmount + ", Base:" + taxBaseAmt);
response = execute(cmdNextIVATransmission());
type = response.getInt(3);
}
}
use of ar.com.ergio.print.fiscal.FiscalPacket in project lar_361 by comitsrl.
the class HasarFiscalPrinter method cmdGetEmbarkNumber.
public FiscalPacket cmdGetEmbarkNumber(int line) {
FiscalPacket cmd = createFiscalPacket(CMD_GET_EMBARK_NUMBER);
int i = 1;
cmd.setNumber(i++, line, false);
return cmd;
}
Aggregations