Commit e2e8e19a by guanzhenshan

调整销售统计报表金额显示格式

parent 5095a1ad
...@@ -387,33 +387,33 @@ namespace Bailun.DC.Services ...@@ -387,33 +387,33 @@ namespace Bailun.DC.Services
{ {
if (m != null && m.userable_amount == item.userable_amount) if (m != null && m.userable_amount == item.userable_amount)
{ {
item.amount = m.amount + item.amount_sales - item.withdraw_amount; //本期期末=上一期期末+本期销售额-本期提现额 //item.amount = m.amount + item.amount_sales - item.withdraw_amount; //本期期末=上一期期末+本期销售额-本期提现额
item.amount_rmb = item.amount * item.exchangerate; //item.amount_rmb = item.amount * item.exchangerate;
item.before_balance = m.amount; item.before_balance = m.amount;
} }
else if (m != null && m.userable_amount != item.userable_amount) else if (m != null && m.userable_amount != item.userable_amount)
{ {
item.amount = item.userable_amount + item.amount_sales - item.withdraw_amount; //item.amount = item.userable_amount + item.amount_sales - item.withdraw_amount;
item.amount_rmb = item.amount * item.exchangerate; //item.amount_rmb = item.amount * item.exchangerate;
item.before_balance = item.userable_amount; item.before_balance = item.userable_amount;
} }
else if (m == null && m.userable_amount == item.userable_amount) else if (m == null && m.userable_amount == item.userable_amount)
{ {
item.amount = 0 + item.amount_sales - item.withdraw_amount; //本期期末=上一期期末+本期销售额-本期提现额 //item.amount = 0 + item.amount_sales - item.withdraw_amount; //本期期末=上一期期末+本期销售额-本期提现额
item.amount_rmb = item.amount * item.exchangerate; //item.amount_rmb = item.amount * item.exchangerate;
item.before_balance = 0; item.before_balance = 0;
} }
else if (m == null && m.userable_amount != item.userable_amount) else if (m == null && m.userable_amount != item.userable_amount)
{ {
item.amount = item.userable_amount + item.amount_sales - item.withdraw_amount; //item.amount = item.userable_amount + item.amount_sales - item.withdraw_amount;
item.amount_rmb = item.amount * item.exchangerate; //item.amount_rmb = item.amount * item.exchangerate;
item.before_balance = item.userable_amount; item.before_balance = item.userable_amount;
} }
} }
else else
{ {
item.amount = item.userable_amount; //item.amount = item.userable_amount;
item.amount_rmb = item.userable_amount * item.exchangerate; //item.amount_rmb = item.userable_amount * item.exchangerate;
item.before_balance = m.userable_amount; item.before_balance = m.userable_amount;
} }
......
...@@ -76,7 +76,7 @@ namespace Bailun.DC.Services ...@@ -76,7 +76,7 @@ namespace Bailun.DC.Services
{ {
var sqlparam = new DynamicParameters(); var sqlparam = new DynamicParameters();
var sql = @"select sum(amount_product*seller_order_exchange_rate) 'amount_product',sum(cost_product) 'cost_product',sum(cost_platform_fee*seller_order_exchange_rate) 'platform_fee',sum(cost_first) 'head_fee',count(id) 'order_count',sum(cost_total) 'cost_count',sum(cost_shipping) 'nofba_logisticsfee',sum(profit_total) 'profit_count',(sum(profit_total)/sum(amount_sales*seller_order_exchange_rate)) 'profit_rate',sum(amount_prepaid) amount_prepaid,sum(amount_refund*seller_order_exchange_rate) amount_refund from dc_base_oms_order from dc_base_oms_order where paid_time>='" + start.ToString("yyyy-MM-dd") + "' and paid_time<'" + end.AddDays(1).ToString("yyyy-MM-dd") + "' and platform_type='Amazon' and bailun_order_status!='Canceled' "; var sql = @"select sum(amount_product*seller_order_exchange_rate) 'amount_product',sum(cost_product) 'cost_product',sum(cost_platform_fee*seller_order_exchange_rate) 'platform_fee',sum(cost_first) 'head_fee',count(id) 'order_count',sum(cost_total) 'cost_count',sum(cost_shipping) 'nofba_logisticsfee',sum(profit_total) 'profit_count',(sum(profit_total)/sum(amount_sales*seller_order_exchange_rate)) 'profit_rate',sum(amount_prepaid) amount_prepaid,sum(amount_refund*seller_order_exchange_rate) amount_refund from dc_base_oms_order where paid_time>='" + start.ToString("yyyy-MM-dd") + "' and paid_time<'" + end.AddDays(1).ToString("yyyy-MM-dd") + "' and platform_type='Amazon' and bailun_order_status!='Canceled' ";
if (!string.IsNullOrWhiteSpace(account)) if (!string.IsNullOrWhiteSpace(account))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment