Update BaseXPrint.java
This commit is contained in:
parent
7f9aa52e47
commit
522af3578c
@ -559,6 +559,7 @@ public abstract class BaseXPrint {
|
||||
String MMK = "MMK";
|
||||
SettleData settleData = payDetail.getSettleDataObj();
|
||||
boolean isQrDecimalEnabled = SystemParamsOperation.getInstance().isQrDecimalEnable();
|
||||
boolean isWallet = "WALLET".equalsIgnoreCase(payDetail.getAccountType());
|
||||
|
||||
int totalCount = settleData.getSaleCount() + settleData.getWavePayCount() + settleData.getVoidSaleCount() + settleData.getCashAdvanceCount() + settleData.getRefundCount() + settleData.getPreAuthCompCount() + settleData.getPreAuthCompVoidCount() + settleData.getWaveRefundCount();
|
||||
long totalAmount = (settleData.getCashAdvanceAmount() + settleData.getSaleAmount() + settleData.getWavePayAmount() + settleData.getPreAuthCompAmount()) - (settleData.getVoidSaleAmount() + settleData.getRefundAmount() + settleData.getPreAuthCompVoidAmount() + settleData.getWaveRefundAmount());
|
||||
@ -583,33 +584,57 @@ public abstract class BaseXPrint {
|
||||
|
||||
printer.appendPrnStr("(COUNT)TRANS", "AMOUNT(MMK)", fontNormal, false);
|
||||
|
||||
if (settleData.getSaleCount() > 0)
|
||||
printColumnString("SALES", settleData.getSaleCount(), settleData.getSaleAmount(), false);
|
||||
// printer.appendPrnStr("SALES "+ countStringFormat(settleData.getSaleCount())+MMK+" "+ PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getSaleAmount()), fontNormal, AlignEnum.LEFT,false);
|
||||
if (settleData.getVoidSaleCount() > 0)
|
||||
printColumnString("VOID SALES", settleData.getVoidSaleCount(), settleData.getVoidSaleAmount(), true);
|
||||
if (settleData.getCashAdvanceCount() > 0)
|
||||
printColumnString("CASH OUT", settleData.getCashAdvanceCount(), settleData.getCashAdvanceAmount(), false);
|
||||
if (settleData.getPreAuthCount() > 0)
|
||||
printColumnString("PRE AUTH", settleData.getPreAuthCount(), settleData.getPreAuthAmount(), false);
|
||||
if (settleData.getPreAuthVoidCount() > 0)
|
||||
printColumnString("VOID PREAUTH", settleData.getPreAuthVoidCount(), settleData.getPreAuthVoidAmount(), true);
|
||||
if (settleData.getRefundCount() > 0)
|
||||
printColumnString("REFUND", settleData.getRefundCount(), settleData.getRefundAmount(), true);
|
||||
if (settleData.getPreAuthCompCount() > 0)
|
||||
printColumnString("PREAUTH COMP", settleData.getPreAuthCompCount(), settleData.getPreAuthCompAmount(), false);
|
||||
if (settleData.getPreAuthCompVoidCount() > 0)
|
||||
printColumnString("VOID PREAUTH COMPLETE", settleData.getPreAuthCompVoidCount(), settleData.getPreAuthCompVoidAmount(), true);
|
||||
if (settleData.getWavePayCount() >= 0){
|
||||
// printColumnString("QR PAY", settleData.getWavePayCount(), settleData.getWavePayAmount(), false);
|
||||
// printer.appendPrnStr( "QR PAY " + countStringFormat(settleData.getWavePayCount()) + " " + "MMK" , PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getWavePayAmount(), isQrDecimalEnabled) , fontNormal, false);
|
||||
if (!isWallet) {
|
||||
boolean isDecimalEnabled = SystemParamsOperation.getInstance().getDecimalEnable();
|
||||
if (settleData.getSaleCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getSaleCount() + ")" + "SALES",
|
||||
PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getSaleAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
if (settleData.getVoidSaleCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getVoidSaleCount() + ")" + "VOID SALES",
|
||||
"- " + PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getVoidSaleAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
if (settleData.getCashAdvanceCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getCashAdvanceCount() + ")" + "CASH OUT",
|
||||
PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getCashAdvanceAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
if (settleData.getPreAuthCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getPreAuthCount() + ")" + "PRE AUTH",
|
||||
PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getPreAuthAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
if (settleData.getPreAuthVoidCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getPreAuthVoidCount() + ")" + "VOID PREAUTH",
|
||||
"- " + PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getPreAuthVoidAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
if (settleData.getRefundCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getRefundCount() + ")" + "REFUND",
|
||||
"- " + PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getRefundAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
if (settleData.getPreAuthCompCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getPreAuthCompCount() + ")" + "PREAUTH COMP",
|
||||
PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getPreAuthCompAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
if (settleData.getPreAuthCompVoidCount() > 0) {
|
||||
printer.appendPrnStr("(" + settleData.getPreAuthCompVoidCount() + ")" + "VOID PREAUTH COMPLETE",
|
||||
"- " + PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getPreAuthCompVoidAmount(), isDecimalEnabled),
|
||||
fontNormal, false);
|
||||
}
|
||||
}
|
||||
if (isWallet) {
|
||||
if (settleData.getWavePayCount() > 0){
|
||||
printer.appendPrnStr( "(" + settleData.getWavePayCount() + ")" + "QR PAY" , PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getWavePayAmount(), isQrDecimalEnabled) , fontNormal, false);
|
||||
}
|
||||
if (settleData.getWaveRefundCount() >= 0) {
|
||||
// printColumnString("QR REFUND", settleData.getWaveRefundCount(), settleData.getWaveRefundAmount(), true);
|
||||
// printer.appendPrnStr( "QR REFUND " + countStringFormat(settleData.getWaveRefundCount()) + " " + "MMK" , PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getWaveRefundAmount(), isQrDecimalEnabled) , fontNormal, false);
|
||||
if (settleData.getWaveRefundCount() > 0) {
|
||||
printer.appendPrnStr( "(" + settleData.getWaveRefundCount() + ")" + "QR REFUND", "- " + PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getWaveRefundAmount(), isQrDecimalEnabled) , fontNormal, false);
|
||||
}
|
||||
}
|
||||
// dashBreak();
|
||||
dotBreak();
|
||||
// printColumnString("TOTAL", totalCount, totalAmount, false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user