From 2eadf3769b41e74c56364f3a6509a728a652af51 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 16 十月 2026 10:44:48 +0800
Subject: [PATCH] feat(erp): 付款单付款账户、关联来票、付款明细改为非必填
---
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/service/quotation/CrmSaleQuotationServiceImpl.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/service/quotation/CrmSaleQuotationServiceImpl.java b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/service/quotation/CrmSaleQuotationServiceImpl.java
index a65a717..e39f30e 100644
--- a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/service/quotation/CrmSaleQuotationServiceImpl.java
+++ b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/service/quotation/CrmSaleQuotationServiceImpl.java
@@ -202,10 +202,14 @@
// 鐗╂枡鍘熶环锛屽鏋� MDM 涓病鏈夊垯榛樿涓� 0
item.setItemPrice(mdmItem.getSalesPrice() != null ? mdmItem.getSalesPrice() : BigDecimal.ZERO);
if (item.getQuotationPrice() != null && item.getCount() != null) {
- item.setTotalPrice(MoneyUtils.priceMultiply(item.getQuotationPrice(), item.getCount()));
+ // 鎶ヤ环涓哄惈绋庡崟浠凤細鍚◣閲戦 = 鍗曚环 脳 鏁伴噺锛涚◣棰� = 鍚◣閲戦 脳 绋庣巼锛涗笉鍚◣閲戦 = 鍚◣閲戦 - 绋庨
+ BigDecimal taxInclusivePrice = MoneyUtils.priceMultiply(item.getQuotationPrice(), item.getCount());
+ BigDecimal taxPrice = null;
if (item.getTaxPercent() != null) {
- item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent()));
+ taxPrice = MoneyUtils.priceMultiplyPercent(taxInclusivePrice, item.getTaxPercent());
}
+ item.setTaxPrice(taxPrice);
+ item.setTotalPrice(taxPrice != null ? taxInclusivePrice.subtract(taxPrice) : taxInclusivePrice);
}
}));
}
--
Gitblit v1.9.3