|
|
|
@ -309,18 +309,18 @@ namespace DS.WMS.Core.Fee.Dtos
|
|
|
|
|
PayableTotal = localPayable + otherPayable;//应付合计
|
|
|
|
|
|
|
|
|
|
//人民币
|
|
|
|
|
ReceivableCNY = _source.Where(x => x.FeeType == FeeType.Receivable && x.Currency == "CNY").Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
PayableCNY = _source.Where(x => x.FeeType == FeeType.Payable && x.Currency == "CNY").Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
ReceivableCNY = _source.Where(x => x.FeeType == FeeType.Receivable && x.Currency == FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
PayableCNY = _source.Where(x => x.FeeType == FeeType.Payable && x.Currency == FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//美元
|
|
|
|
|
ReceivableUSD = _source.Where(x => x.FeeType == FeeType.Receivable && x.Currency == "USD").Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
PayableUSD = _source.Where(x => x.FeeType == FeeType.Payable && x.Currency == "USD").Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
ReceivableUSD = _source.Where(x => x.FeeType == FeeType.Receivable && x.Currency == FeeCurrency.USD_CODE).Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
PayableUSD = _source.Where(x => x.FeeType == FeeType.Payable && x.Currency == FeeCurrency.USD_CODE).Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//其他
|
|
|
|
|
ReceivableOther = _source.Where(x => x.FeeType == FeeType.Receivable && x.Currency != "USD" && x.Currency != "CNY").Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
PayableOther = _source.Where(x => x.FeeType == FeeType.Payable && x.Currency != "USD" && x.Currency != "CNY").Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
ReceivableOther = _source.Where(x => x.FeeType == FeeType.Receivable && x.Currency != FeeCurrency.USD_CODE && x.Currency != FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
PayableOther = _source.Where(x => x.FeeType == FeeType.Payable && x.Currency != FeeCurrency.USD_CODE && x.Currency != FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault();
|
|
|
|
|
|
|
|
|
|
//按客户统计
|
|
|
|
|
ByCustomer = (from s in _source
|
|
|
|
@ -330,12 +330,12 @@ namespace DS.WMS.Core.Fee.Dtos
|
|
|
|
|
CustomerName = g.Key,
|
|
|
|
|
ReceivableTotal = g.Where(x => x.FeeType == FeeType.Receivable).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableTotal = g.Where(x => x.FeeType == FeeType.Payable).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableCNY = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == "CNY").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableCNY = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == "CNY").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableUSD = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == "USD").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableUSD = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == "USD").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableOther = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency != "USD" && x.Currency != "CNY").Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault(),
|
|
|
|
|
PayableOther = g.Where(x => x.FeeType == FeeType.Payable && x.Currency != "USD" && x.Currency != "CNY").Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault()
|
|
|
|
|
ReceivableCNY = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableCNY = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableUSD = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == FeeCurrency.USD_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableUSD = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == FeeCurrency.USD_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableOther = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency != FeeCurrency.USD_CODE && x.Currency != FeeCurrency.RMB_CODE).Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault(),
|
|
|
|
|
PayableOther = g.Where(x => x.FeeType == FeeType.Payable && x.Currency != FeeCurrency.USD_CODE && x.Currency != FeeCurrency.RMB_CODE).Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault()
|
|
|
|
|
}).ToList();
|
|
|
|
|
ByCustomer.Add(new ByCustomerStat
|
|
|
|
|
{
|
|
|
|
@ -358,12 +358,12 @@ namespace DS.WMS.Core.Fee.Dtos
|
|
|
|
|
BillNO = g.Key,
|
|
|
|
|
ReceivableTotal = g.Where(x => x.FeeType == FeeType.Receivable).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableTotal = g.Where(x => x.FeeType == FeeType.Payable).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableCNY = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == "CNY").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableCNY = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == "CNY").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableUSD = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == "USD").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableUSD = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == "USD").Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableOther = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency != "USD" && x.Currency != "CNY").Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault(),
|
|
|
|
|
PayableOther = g.Where(x => x.FeeType == FeeType.Payable && x.Currency != "USD" && x.Currency != "CNY").Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault()
|
|
|
|
|
ReceivableCNY = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableCNY = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == FeeCurrency.RMB_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableUSD = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency == FeeCurrency.USD_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
PayableUSD = g.Where(x => x.FeeType == FeeType.Payable && x.Currency == FeeCurrency.USD_CODE).Sum(x => x.Amount).GetValueOrDefault(),
|
|
|
|
|
ReceivableOther = g.Where(x => x.FeeType == FeeType.Receivable && x.Currency != FeeCurrency.USD_CODE && x.Currency != FeeCurrency.RMB_CODE).Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault(),
|
|
|
|
|
PayableOther = g.Where(x => x.FeeType == FeeType.Payable && x.Currency != FeeCurrency.USD_CODE && x.Currency != FeeCurrency.RMB_CODE).Sum(x => x.Amount * x.ExchangeRate).GetValueOrDefault()
|
|
|
|
|
}).ToList();
|
|
|
|
|
ByBusiness.Add(new ByBusinessStat
|
|
|
|
|
{
|
|
|
|
|