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