原价 用餐人数

This commit is contained in:
2026-04-03 11:38:58 +08:00
parent 71d0252cf8
commit 365968b66c
2 changed files with 8 additions and 4 deletions

View File

@@ -683,7 +683,8 @@ public abstract class PrinterHandler {
originalAmount = originalAmount.add((orderDetail.getNum().subtract(orderDetail.getReturnNum()).subtract(orderDetail.getRefundNum())).multiply(orderDetail.getPrice()));
}
}
printInfoDTO.setOriginalAmount((originalAmount.add(orderInfo.getSeatAmount()).add(orderInfo.getPackFee())).toPlainString());
printInfoDTO.setOriginalAmount((originalAmount.add(orderInfo.getSeatAmount()).add(orderInfo.getPackFee()))
.setScale(2, RoundingMode.HALF_UP).toPlainString());
printInfoDTO.setPayAmount((originalAmount.add(orderInfo.getSeatAmount()).add(orderInfo.getPackFee())
.subtract(orderInfo.getDiscountAllAmount())).setScale(2, RoundingMode.HALF_UP).toPlainString());

View File

@@ -257,7 +257,8 @@ public interface PrinterImpl {
data.append(getFormatLabel(printInfoDTO.getShopName(), signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br);
data.append(getFormatLabel(printInfoDTO.getPrintTitle(), signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br);
data.append(getFormatLabel(printInfoDTO.getPickupNum(), signLabelInfo.f)).append(signLabelInfo.br);
data.append(getFormatLabel(getFormatLabel(leftRightAlign(printInfoDTO.getPrintType(), printInfoDTO.getSeatNum(), 32)), signLabelInfo.s)).append(signLabelInfo.br);
data.append(getFormatLabel(getFormatLabel(leftRightAlign(printInfoDTO.getPrintType(), StrUtil.isNotBlank(printInfoDTO.getSeatNum()) ? printInfoDTO.getSeatNum() + "" : "", 32))
, signLabelInfo.s)).append(signLabelInfo.br);
if (StrUtil.isNotBlank(printInfoDTO.getTradeDate())) {
data.append(getFormatLabel(StrUtil.format("结账时间:{}", printInfoDTO.getTradeDate()), signLabelInfo.s)).append(signLabelInfo.br);
}
@@ -343,7 +344,8 @@ public interface PrinterImpl {
if (StrUtil.isNotBlank(printInfoDTO.getPickupNum())) {
data.append(getFormatLabel(printInfoDTO.getPickupNum(), signLabelInfo.f)).append(signLabelInfo.br);
}
data.append(getFormatLabel(getFormatLabel(leftRightAlign(printInfoDTO.getPrintType(), printInfoDTO.getSeatNum() + "", 32)), signLabelInfo.s)).append(signLabelInfo.br);
data.append(getFormatLabel(getFormatLabel(leftRightAlign(printInfoDTO.getPrintType(), StrUtil.isNotBlank(printInfoDTO.getSeatNum()) ? printInfoDTO.getSeatNum() + "" : "", 32))
, signLabelInfo.s)).append(signLabelInfo.br);
data.append(getFormatLabel("--------------------------------", signLabelInfo.s)).append(signLabelInfo.br);
data.append(getFormatLabel(formatItemLine("品名", "单价", "数量", 18, 9), signLabelInfo.s)).append(signLabelInfo.br);
@@ -413,7 +415,8 @@ public interface PrinterImpl {
data.append(getFormatLabel(printInfoDTO.getShopName(), signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br);
data.append(getFormatLabel(printInfoDTO.getPrintTitle(), signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br);
data.append(getFormatLabel(printInfoDTO.getPickupNum(), signLabelInfo.f)).append(signLabelInfo.br);
data.append(getFormatLabel(getFormatLabel(leftRightAlign(printInfoDTO.getPrintType(), printInfoDTO.getSeatNum(), 32)), signLabelInfo.s)).append(signLabelInfo.br);
data.append(getFormatLabel(getFormatLabel(leftRightAlign(printInfoDTO.getPrintType(), StrUtil.isNotBlank(printInfoDTO.getSeatNum()) ? printInfoDTO.getSeatNum() + "" : "", 32))
, signLabelInfo.s)).append(signLabelInfo.br);
data.append(getFormatLabel("--------------------------------", signLabelInfo.s)).append(signLabelInfo.br);
if (CollUtil.isNotEmpty(detailList)) {
data.append(getFormatLabel(formatItemLine("退款明细", "数量", "小计", 18, 9), signLabelInfo.s)).append(signLabelInfo.br);