Commit 40ee88d3 by guanzhenshan

调整平台费列表

parent 789cbeb7
......@@ -126,7 +126,7 @@ namespace Bailun.DC.Services
public dc_base_oms_order ListPlatformCostCount(string platform, DateTime? start, DateTime? end, string website, string account,string warehousetype,string warehousecode,int? companyid,string skucategoryids)
{
var sql = "select sum(t1.amount_sales*t1.seller_order_exchange_rate) amount_sales,sum((if(t1.platform_type='Ebay',t1.seller_other_exchange_rate,t1.seller_order_exchange_rate))*t1.cost_platform_fee) as cost_platform_fee,sum(t1.cost_fba_fee*t1.seller_order_exchange_rate) cost_fba_fee,sum(t1.cost_promotion*t1.seller_order_exchange_rate) cost_promotion,sum(t1.cost_paypal_fee*t1.seller_order_exchange_rate) cost_paypal_fee,sum(t1.cost_tail) cost_tail,sum(t1.cost_handle_bailun) cost_handle_bailun,sum(t1.amount_shipping*t1.seller_order_exchange_rate) amount_shipping from dc_base_oms_order t1 ";
var sql = "select sum(t1.amount_sales*t1.seller_order_exchange_rate) amount_sales,sum((if(t1.platform_type='Ebay',t1.seller_other_exchange_rate,t1.seller_order_exchange_rate))*t1.cost_platform_fee) as cost_platform_fee,sum(t1.cost_fba_fee*t1.seller_order_exchange_rate) cost_fba_fee,sum(t1.cost_promotion*t1.seller_order_exchange_rate) cost_promotion,sum(t1.cost_paypal_fee*t1.seller_order_exchange_rate) cost_paypal_fee,sum(t1.cost_logistics) cost_logistics,sum(t1.cost_handle_bailun) cost_handle_bailun,sum(t1.amount_shipping*t1.seller_order_exchange_rate) amount_shipping,sum(cost_product) cost_product,sum(t1.cost_first) cost_first,sum(t1.amount_prepaid) amount_prepaid,sum(t1.profit_total) profit_total,(sum(t1.profit_total)/sum(t1.amount_sales*t1.seller_order_exchange_rate)), profit_rate,sum(t1.amount_refund*t1.seller_order_exchange_rate) amount_refund from dc_base_oms_order t1 ";
var sqlparam = new DynamicParameters();
if (!string.IsNullOrEmpty(warehousetype))
......@@ -3807,12 +3807,12 @@ namespace Bailun.DC.Services
{
var sqlparam = new DynamicParameters();
var sqlselect = "select t1.platform_type,t1.website,t1.origin_order_id,t1.seller_account,t1.amount_refund,(t1.seller_order_exchange_rate*t1.amount_refund) as refundrmb,t1.refund_time,t1.refund_reference_id from dc_base_oms_order t1 ";
var sql = " where ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA') and t1.amount_refund>0 ";
var sql = " where t1.amount_refund>0 ";
if (paytimestart.HasValue || paytimeend.HasValue)
{
sql += " and t1.bailun_order_status!='Canceled' and t1.has_scalp=0 and t1.has_innersale=0 and t1.bailun_interception_status in ('None','Failed') ";
}
//if (paytimestart.HasValue || paytimeend.HasValue)
//{
// sql += " and t1.bailun_order_status!='Canceled' and t1.has_scalp=0 and t1.has_innersale=0 and t1.bailun_interception_status in ('None','Failed') ";
//}
if (companyid.HasValue && companyid.Value > 0)
{
......@@ -3973,12 +3973,12 @@ namespace Bailun.DC.Services
{
var sqlparam = new DynamicParameters();
var sql = "select sum(t1.amount_refund) as amount_refund,sum(t1.seller_order_exchange_rate*t1.amount_refund) as refundrmb from dc_base_oms_order t1 ";
sql += " where ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA') and t1.amount_refund>0 ";
sql += " where t1.amount_refund>0 ";
if (paytimestart.HasValue || paytimeend.HasValue)
{
sql += " and t1.bailun_order_status!='Canceled' and t1.has_scalp=0 and t1.has_innersale=0 and t1.bailun_interception_status in ('None','Failed') ";
}
//if (paytimestart.HasValue || paytimeend.HasValue)
//{
// sql += " and t1.bailun_order_status!='Canceled' and t1.has_scalp=0 and t1.has_innersale=0 and t1.bailun_interception_status in ('None','Failed') ";
//}
if (companyid.HasValue && companyid.Value > 0)
{
......
......@@ -75,7 +75,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
cost_handle_bailun = p.cost_handle_bailun.ToString("N2"),
cost_handle_platform = p.cost_handle_platform.ToString("N2"),
cost_first = p.cost_first.ToString("N2"),
cost_tail = p.cost_tail.ToString("N2"),
cost_logistics = p.cost_logistics.ToString("N2"),
profit_total = p.profit_total.ToString("N2"),
profit_rate = (p.profit_rate*100).ToString("N2"),
paid_time = p.paid_time.ToString("yyyy-MM-dd HH:mm:ss"),
......@@ -103,7 +103,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
cost_handle_bailun = countM.cost_handle_bailun.ToString("N2"),
cost_handle_platform = countM.cost_handle_platform.ToString("N2"),
cost_first = countM.cost_first.ToString("N2"),
cost_tail = countM.cost_tail.ToString("N2"),
cost_logistics = countM.cost_logistics.ToString("N2"),
profit_total = countM.profit_total.ToString("N2"),
profit_rate = countM.amount_sales>0?((countM.profit_total/ countM.amount_sales) * 100).ToString("N2"):"0",
}
......@@ -2062,10 +2062,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ToCSV(listVal, colNames, filename, filepath);
return File("~/Files/Report/" + DateTime.Now.ToString("yyyy-MM-dd") + "/" + filename + ".csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", filename + ".csv");
}
#endregion
......
......@@ -145,7 +145,7 @@
}
@if (ViewBag.platform != "FBA")
{
@Html.Raw("{ field: 'cost_tail', title: '尾程费', width: '120', sortable: true, iscount: true },{ field: 'cost_handle_bailun', title: '百伦处理费', width: '160', sortable: true, iscount: true},")
@Html.Raw("{ field: 'cost_logistics', title: '尾程费', width: '120', sortable: true, iscount: true },{ field: 'cost_handle_bailun', title: '百伦处理费', width: '160', sortable: true, iscount: true},")
}
//{ field: 'cost_refund_commisson', title: '退款佣金', width: '120', 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