Commit 21cc3b6f by guanzhenshan

调整订单流水的销售总金额改为销售额

parent 7bc9da30
......@@ -718,7 +718,7 @@ namespace Bailun.DC.Services
public List<Models.Orders.dc_base_oms_order> ListOrders(BtTableParameter parameter, string platform, string website, string account, DateTime? start, DateTime? end, string orderno, string sku, int? companyid, ref int total, string skucategoryids, decimal? rate_start, decimal? rate_end, string itemid = null)
{
var sqlparam = new DynamicParameters();
var sql = "select t1.origin_order_id,t1.bailun_order_id,t1.platform_type,t1.website,t1.seller_account,t1.platform_order_type,t1.bailun_order_status,t1.bailun_payment_status,t1.bailun_shipping_status,t1.order_currency,(t1.amount_total*t1.seller_order_exchange_rate) amount_total,(t1.amount_shipping*t1.seller_order_exchange_rate) amount_shipping,(t1.amount_product*t1.seller_order_exchange_rate) amount_product,(t1.amount_adjustment*t1.seller_order_exchange_rate) amount_adjustment,(t1.cost_promotion*t1.seller_order_exchange_rate) cost_promotion,((if(t1.platform_type='Ebay',t1.seller_other_exchange_rate,t1.seller_order_exchange_rate))*t1.cost_platform_fee) cost_platform_fee,t1.cost_product,t1.cost_first,t1.cost_package,(t1.cost_fba_fee*t1.seller_order_exchange_rate) cost_fba_fee,t1.cost_total,(t1.profit_total) profit_total,t1.profit_rate,t1.create_time,t1.order_update_time,t1.profit_oms,t1.cost_handle_bailun,t1.cost_handle_platform,t1.cost_logistics,(t1.cost_paypal_fee*t1.seller_order_exchange_rate) cost_paypal_fee from dc_base_oms_order t1";
var sql = "select t1.origin_order_id,t1.bailun_order_id,t1.platform_type,t1.website,t1.seller_account,t1.platform_order_type,t1.bailun_order_status,t1.bailun_payment_status,t1.bailun_shipping_status,t1.order_currency,(t1.amount_sales*t1.seller_order_exchange_rate) amount_sales,(t1.amount_shipping*t1.seller_order_exchange_rate) amount_shipping,(t1.amount_product*t1.seller_order_exchange_rate) amount_product,(t1.amount_adjustment*t1.seller_order_exchange_rate) amount_adjustment,(t1.cost_promotion*t1.seller_order_exchange_rate) cost_promotion,((if(t1.platform_type='Ebay',t1.seller_other_exchange_rate,t1.seller_order_exchange_rate))*t1.cost_platform_fee) cost_platform_fee,t1.cost_product,t1.cost_first,t1.cost_package,(t1.cost_fba_fee*t1.seller_order_exchange_rate) cost_fba_fee,t1.cost_total,(t1.profit_total) profit_total,t1.profit_rate,t1.create_time,t1.order_update_time,t1.profit_oms,t1.cost_handle_bailun,t1.cost_handle_platform,t1.cost_logistics,(t1.cost_paypal_fee*t1.seller_order_exchange_rate) cost_paypal_fee from dc_base_oms_order t1";
if (!string.IsNullOrWhiteSpace(skucategoryids))
{
......@@ -881,7 +881,7 @@ namespace Bailun.DC.Services
public Models.Orders.dc_base_oms_order ListOrdersCount(string platform, string website, string account, DateTime? start, DateTime? end, string orderno, string sku, int? companyid, string skucategoryids, decimal? rate_start, decimal? rate_end, string itemid = null)
{
var sqlparam = new DynamicParameters();
var sql = "select sum(t1.amount_total*t1.seller_order_exchange_rate) amount_total,sum(t1.amount_shipping*t1.seller_order_exchange_rate) amount_shipping,sum(t1.amount_product*t1.seller_order_exchange_rate) amount_product,sum(t1.amount_adjustment*t1.seller_order_exchange_rate) amount_adjustment,sum(t1.cost_promotion*t1.seller_order_exchange_rate) cost_promotion,sum((if(t1.platform_type='FBA',t1.seller_other_exchange_rate,t1.seller_order_exchange_rate))*t1.cost_platform_fee) cost_platform_fee,sum(t1.cost_product) cost_product,sum(t1.cost_first) cost_first,sum(t1.cost_package) cost_package,sum(t1.cost_fba_fee*t1.seller_order_exchange_rate) cost_fba_fee,sum(t1.cost_total) cost_total,sum(t1.profit_total) profit_total,sum(t1.profit_oms) profit_oms,sum(t1.cost_handle_bailun) cost_handle_bailun,sum(t1.cost_handle_platform) cost_handle_platform,sum(t1.cost_logistics) cost_logistics,(t1.cost_paypal_fee*t1.seller_order_exchange_rate) cost_paypal_fee from dc_base_oms_order t1";
var sql = "select sum(t1.amount_sales*t1.seller_order_exchange_rate) amount_sales,sum(t1.amount_shipping*t1.seller_order_exchange_rate) amount_shipping,sum(t1.amount_product*t1.seller_order_exchange_rate) amount_product,sum(t1.amount_adjustment*t1.seller_order_exchange_rate) amount_adjustment,sum(t1.cost_promotion*t1.seller_order_exchange_rate) cost_promotion,sum((if(t1.platform_type='FBA',t1.seller_other_exchange_rate,t1.seller_order_exchange_rate))*t1.cost_platform_fee) cost_platform_fee,sum(t1.cost_product) cost_product,sum(t1.cost_first) cost_first,sum(t1.cost_package) cost_package,sum(t1.cost_fba_fee*t1.seller_order_exchange_rate) cost_fba_fee,sum(t1.cost_total) cost_total,sum(t1.profit_total) profit_total,sum(t1.profit_oms) profit_oms,sum(t1.cost_handle_bailun) cost_handle_bailun,sum(t1.cost_handle_platform) cost_handle_platform,sum(t1.cost_logistics) cost_logistics,(t1.cost_paypal_fee*t1.seller_order_exchange_rate) cost_paypal_fee from dc_base_oms_order t1";
if (!string.IsNullOrWhiteSpace(skucategoryids))
{
......
......@@ -426,7 +426,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
countM.amount_refund = Math.Round(countM.amount_refund, 2, MidpointRounding.AwayFromZero);
countM.amount_shipping = Math.Round(countM.amount_shipping, 2, MidpointRounding.AwayFromZero);
countM.amount_tax = Math.Round(countM.amount_tax, 2, MidpointRounding.AwayFromZero);
countM.amount_total = Math.Round(countM.amount_total, 2, MidpointRounding.AwayFromZero);
countM.amount_sales = Math.Round(countM.amount_sales, 2, MidpointRounding.AwayFromZero);
countM.cost_estimate_logistics = Math.Round(countM.cost_estimate_logistics, 2, MidpointRounding.AwayFromZero);
countM.cost_fba_fee = Math.Round(countM.cost_fba_fee, 2, MidpointRounding.AwayFromZero);
......@@ -454,7 +454,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
p.bailun_payment_status,
p.bailun_shipping_status,
p.order_currency,
amount_total = p.amount_total>0? p.amount_total.ToString("N2"):"0",
amount_sales = p.amount_sales > 0? p.amount_sales.ToString("N2"):"0",
amount_shipping = p.amount_shipping>0? p.amount_shipping.ToString("N2"):"0",
amount_product = p.amount_product>0? p.amount_product.ToString("N2"):"0",
amount_adjustment = p.amount_adjustment>0? p.amount_adjustment.ToString("N2"):"0",
......
......@@ -123,7 +123,7 @@
{ field: 'bailun_payment_status', title: '付款状态', width: '100', sortable: true },
{ field: 'bailun_shipping_status', title: '发货状态', width: '110', sortable: true },
{ field: 'order_currency', title: '币种', width: '80', sortable: true },
{ field: 'amount_total', title: '订单总金额', width: '120', sortable: true, iscount: true },
{ field: 'amount_sales', title: '订单销售额', width: '120', sortable: true, iscount: true },
{ field: 'amount_shipping', title: '运费收入', width: '80', sortable: true, iscount: true },
{ field: 'amount_product', title: '商品金额', width: '100', sortable: true, iscount: true },
{ field: 'amount_adjustment', title: '调整金额', width: '100', sortable: true, iscount: true },
......
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