소스 검색

发票金额进度调整

liuj 2 주 전
부모
커밋
160c3d21b4
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceApprovalServiceImpl.java

+ 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);
         }