|
|
|
@ -279,9 +279,25 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var app = request.Applications.Find(x => x.ApplicationId == item.ApplicationId);
|
|
|
|
|
if (app != null && app.Currency != invoice.Currency)
|
|
|
|
|
detail.ExchangeRate = app.ExchangeRate;
|
|
|
|
|
else
|
|
|
|
|
if (app != null)
|
|
|
|
|
{
|
|
|
|
|
if (app.Currency == invoice.Currency)
|
|
|
|
|
{
|
|
|
|
|
detail.ExchangeRate = 1m;
|
|
|
|
|
}
|
|
|
|
|
else if (string.IsNullOrEmpty(app.Currency)) //原币申请
|
|
|
|
|
{
|
|
|
|
|
detail.ExchangeRate = app.ExchangeRates.FirstOrDefault(
|
|
|
|
|
x => x.Currency == invoice.Currency)?.ExchangeRate;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
detail.ExchangeRate = app.ExchangeRates.FirstOrDefault(
|
|
|
|
|
x => x.Currency == invoice.Currency)?.ExchangeRate;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!detail.ExchangeRate.HasValue)
|
|
|
|
|
detail.ExchangeRate = 1m;
|
|
|
|
|
|
|
|
|
|
if (detail.ExchangeRate.HasValue)
|
|
|
|
|