|
|
@@ -879,6 +879,8 @@ public class InvoiceGroupServiceImpl implements InvoiceGroupService {
|
|
|
BigDecimal taxExcludedAmount = BigDecimal.ZERO;
|
|
|
BigDecimal taxExcludedAmounttotal = BigDecimal.ZERO;
|
|
|
BigDecimal se = BigDecimal.ZERO;
|
|
|
+ BigDecimal tse = BigDecimal.ZERO;
|
|
|
+ BigDecimal tje = BigDecimal.ZERO;
|
|
|
BigDecimal taxIncludedAmount = BigDecimal.ZERO;
|
|
|
BigDecimal taxIncludedAmounttotal = BigDecimal.ZERO;
|
|
|
if (inventoryList.isEmpty()) {
|
|
|
@@ -907,10 +909,12 @@ public class InvoiceGroupServiceImpl implements InvoiceGroupService {
|
|
|
taxExcludedAmount = taxIncludedAmount.divide(new BigDecimal(1).add(taxRate), 2, RoundingMode.HALF_UP);
|
|
|
taxExcludedAmounttotal = taxIncludedAmounttotal.divide(new BigDecimal(1).add(taxRate), 2, RoundingMode.HALF_UP);
|
|
|
//金额
|
|
|
+ tje = taxIncludedAmount.setScale(2, RoundingMode.HALF_UP);
|
|
|
detailObj.set("JE", taxIncludedAmount.setScale(2, RoundingMode.HALF_UP));
|
|
|
//税额
|
|
|
- se = taxIncludedAmount.subtract(taxExcludedAmount);
|
|
|
- detailObj.set("SE", se.setScale(2, RoundingMode.HALF_UP));
|
|
|
+ se = taxIncludedAmount.subtract(taxExcludedAmount).setScale(2, RoundingMode.HALF_UP);
|
|
|
+ tse =se;
|
|
|
+ detailObj.set("SE", se);
|
|
|
//扣除额
|
|
|
detailObj.set("KCE", "");
|
|
|
//行性质。0-正常行 1-折扣行 2-被折扣行
|
|
|
@@ -940,9 +944,11 @@ public class InvoiceGroupServiceImpl implements InvoiceGroupService {
|
|
|
//不含税金额
|
|
|
taxExcludedAmount = taxIncludedAmount.divide(new BigDecimal(1).add(taxRate), 2, RoundingMode.HALF_UP);
|
|
|
//金额
|
|
|
+ tje = tje.add(taxIncludedAmount.setScale(2, RoundingMode.HALF_UP));
|
|
|
detailObj2.set("JE", taxIncludedAmount.setScale(2, RoundingMode.HALF_UP));
|
|
|
//税额
|
|
|
se = taxIncludedAmount.subtract(taxExcludedAmount);
|
|
|
+ tse = tse.add(se.setScale(2, RoundingMode.HALF_UP));
|
|
|
detailObj2.set("SE", se.setScale(2, RoundingMode.HALF_UP));
|
|
|
//扣除额
|
|
|
detailObj2.set("KCE", "");
|
|
|
@@ -1013,9 +1019,9 @@ public class InvoiceGroupServiceImpl implements InvoiceGroupService {
|
|
|
}
|
|
|
}
|
|
|
//合计金额
|
|
|
- reqObj.set("HJJE", taxExcludedAmounttotal.setScale(2, RoundingMode.HALF_UP));
|
|
|
+ reqObj.set("HJJE", tje);
|
|
|
//合计税额
|
|
|
- reqObj.set("HJSE", se.setScale(2, RoundingMode.HALF_UP));
|
|
|
+ reqObj.set("HJSE", tse);
|
|
|
if (StringUtils.isNotBlank(remark)) {
|
|
|
//备注
|
|
|
reqObj.set("BZ", remark);
|