From 634b88896d7a891c0a8396576430e01cd8af74f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Thu, 26 Sep 2024 09:31:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E7=BB=93=E7=AE=97=E7=9A=84?= =?UTF-8?q?=E5=B8=81=E5=88=AB=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Settlement/Method/SettlementService`1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs b/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs index 406dc0ee..ee32f7ec 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs @@ -172,7 +172,7 @@ namespace DS.WMS.Core.Settlement.Method ExchangeRate = x.ExchangeRate }).ToListAsync(); - if (settlement.Currency == FeeCurrency.RMB_CODE) //指定结算币别 + if (settlement.Currency != FeeCurrency.RMB_CODE) //发票结算非人民币需做转换 { var details2 = details1.FindAll(x => x.OriginalCurrency != settlement.Currency); foreach (var detail in details2) @@ -185,7 +185,7 @@ namespace DS.WMS.Core.Settlement.Method var exchange = doc.ExchangeRates?.Find(x => x.Currency == settlement.Currency); if (exchange == null) - return DataResult.Failed($"未传入结算币别 {settlement.Currency} 与费用原币别 {detail.OriginalCurrency} 之间的汇率信息"); + return DataResult.Failed($"使用发票做结算时,非 {FeeCurrency.RMB_CODE} 的费用必须指定汇率"); detail.ExchangeRate = exchange.ExchangeRate; detail.ApplyAmount = Math.Round(exchange.ExchangeRate.GetValueOrDefault() * detail.OriginalAmount, 2, MidpointRounding.AwayFromZero);