修改打印小票
This commit is contained in:
@@ -147,13 +147,13 @@ public class PrinterUtils {
|
||||
if(ObjectUtil.isNotNull(detailPO.getDiscountAmount())&&ObjectUtil.isNotNull(detailPO.getDiscountAdio())){
|
||||
sb.append("------------------------<BR>");
|
||||
sb.append("<S>原价:".concat(String.format("%15s", detailPO.getReceiptsAmount()).replace(' ', paddingCharacter)).concat("</S><BR>"));
|
||||
sb.append("<S>折扣: ".concat(String.format("%15s", "-".concat(new BigDecimal(detailPO.getReceiptsAmount()).subtract(new BigDecimal(detailPO.getDiscountAmount())).toPlainString())).replace(' ', paddingCharacter)).concat("</S><BR>"));
|
||||
sb.append("<S>折扣: ".concat(String.format("%15s", "-".concat(new BigDecimal(detailPO.getDiscountAmount()).toPlainString())).replace(' ', paddingCharacter)).concat("</S><BR>"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
sb.append("------------------------<BR>");
|
||||
String t = "¥" + (ObjectUtil.isEmpty(detailPO.getDiscountAmount())||ObjectUtil.isNull(detailPO.getDiscountAmount())?detailPO.getReceiptsAmount():detailPO.getDiscountAmount());
|
||||
String t = "¥" + (ObjectUtil.isEmpty(detailPO.getDiscountAmount())||ObjectUtil.isNull(detailPO.getDiscountAmount())?detailPO.getReceiptsAmount():new BigDecimal(detailPO.getReceiptsAmount()).subtract(new BigDecimal(detailPO.getDiscountAmount())).toPlainString());
|
||||
t = String.format("%11s", t).replace(' ', paddingCharacter);
|
||||
if (orderType.equals("return")) {
|
||||
sb.append("<F>应退" + t + "</F><BR>");
|
||||
|
||||
Reference in New Issue
Block a user