Quellcode durchsuchen

发票金额进度调整

liuj vor 2 Wochen
Ursprung
Commit
160c3d21b4

+ 4 - 4
src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceApprovalServiceImpl.java

@@ -325,16 +325,16 @@ public class InvoiceApprovalServiceImpl extends ServiceImpl<InvoiceApprovalMappe
             List<FileStorage> fileStorages = fileStorageService.findByBelongIdAndBelongType(salesInvoiceInfo.getId() + "", FileModuleDict.ChildEnum.INVOICE_SALES_FILE.getCode());
             salesInvoiceInfo.setSalesInvoicFile(CollectionUtil.isNotEmpty(fileStorages)?fileStorages:new ArrayList<>());
             salesInvoiceInfo.setNvoiceNum(nvoiceNum);
-            salesInvoiceInfo.setAmount(amount.divide(bigDecimal,2, RoundingMode.HALF_UP));
-            salesInvoiceInfo.setTaxAmount(amount.multiply(bigDecimal1).divide(bigDecimal,2, RoundingMode.HALF_UP));
+            salesInvoiceInfo.setAmount(amount.divide(bigDecimal,4, RoundingMode.HALF_UP));
+            salesInvoiceInfo.setTaxAmount(amount.multiply(bigDecimal1).divide(bigDecimal,4, RoundingMode.HALF_UP));
             salesInvoiceInfo.setPriceTaxTotal(amount);
             invoiceApproval.setSalesInvoiceInfo(salesInvoiceInfo);
         }else {
             salesInvoiceInfo = new SalesInvoiceInfo();
             salesInvoiceInfo.setInvoiceBasicInfoId(businessKey);
             salesInvoiceInfo.setNvoiceNum(nvoiceNum);
-            salesInvoiceInfo.setAmount(amount.divide(bigDecimal,2, RoundingMode.HALF_UP));
-            salesInvoiceInfo.setTaxAmount(amount.multiply(bigDecimal1).divide(bigDecimal,2, RoundingMode.HALF_UP));
+            salesInvoiceInfo.setAmount(amount.divide(bigDecimal,4, RoundingMode.HALF_UP));
+            salesInvoiceInfo.setTaxAmount(amount.multiply(bigDecimal1).divide(bigDecimal,4, RoundingMode.HALF_UP));
             salesInvoiceInfo.setPriceTaxTotal(amount);
             invoiceApproval.setSalesInvoiceInfo(salesInvoiceInfo);
         }