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