|
@@ -325,16 +325,16 @@ public class InvoiceApprovalServiceImpl extends ServiceImpl<InvoiceApprovalMappe
|
|
List<FileStorage> fileStorages = fileStorageService.findByBelongIdAndBelongType(salesInvoiceInfo.getId() + "", FileModuleDict.ChildEnum.INVOICE_SALES_FILE.getCode());
|
|
List<FileStorage> fileStorages = fileStorageService.findByBelongIdAndBelongType(salesInvoiceInfo.getId() + "", FileModuleDict.ChildEnum.INVOICE_SALES_FILE.getCode());
|
|
salesInvoiceInfo.setSalesInvoicFile(CollectionUtil.isNotEmpty(fileStorages)?fileStorages:new ArrayList<>());
|
|
salesInvoiceInfo.setSalesInvoicFile(CollectionUtil.isNotEmpty(fileStorages)?fileStorages:new ArrayList<>());
|
|
salesInvoiceInfo.setNvoiceNum(nvoiceNum);
|
|
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);
|
|
salesInvoiceInfo.setPriceTaxTotal(amount);
|
|
invoiceApproval.setSalesInvoiceInfo(salesInvoiceInfo);
|
|
invoiceApproval.setSalesInvoiceInfo(salesInvoiceInfo);
|
|
}else {
|
|
}else {
|
|
salesInvoiceInfo = new SalesInvoiceInfo();
|
|
salesInvoiceInfo = new SalesInvoiceInfo();
|
|
salesInvoiceInfo.setInvoiceBasicInfoId(businessKey);
|
|
salesInvoiceInfo.setInvoiceBasicInfoId(businessKey);
|
|
salesInvoiceInfo.setNvoiceNum(nvoiceNum);
|
|
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);
|
|
salesInvoiceInfo.setPriceTaxTotal(amount);
|
|
invoiceApproval.setSalesInvoiceInfo(salesInvoiceInfo);
|
|
invoiceApproval.setSalesInvoiceInfo(salesInvoiceInfo);
|
|
}
|
|
}
|