Commit 3c4db5eb by DESKTOP-732ATD8\BLT

修改功能:香港百伦管理成本排除"物流费"的费用类型

parent db14c40e
...@@ -581,7 +581,7 @@ namespace Bailun.DC.MonthSaleProfit ...@@ -581,7 +581,7 @@ namespace Bailun.DC.MonthSaleProfit
m.fee_fba = objFBA.Sum(a => a.cost_fba_fee); m.fee_fba = objFBA.Sum(a => a.cost_fba_fee);
//平台退款 //平台退款
sql = $@"select sum(t1.amount_refund_rmb) from dc_base_crm_refund t1 where t1.shipping_status in ('TotalShipping','PartShipping') and t1.is_deleted=0 and is_freeze=0 and t1.company_id=1 and t1.refund_time>='{day.ToString("yyyy-MM-dd")}' and t1.refund_time<'{day.AddMonths(1).ToString("yyyy-MM-dd")}' and t1.shipping_status!='UnShipping'"; sql = $@"select sum(t1.amount_refund_rmb) from dc_base_crm_refund t1 where t1.shipping_status in ('TotalShipping','PartShipping') and t1.is_deleted=0 and is_freeze=0 and t1.company_id=1 and t1.refund_time>='{day.ToString("yyyy-MM-dd")}' and t1.refund_time<'{day.AddMonths(1).ToString("yyyy-MM-dd")}'";
obj = cn.QueryFirstOrDefault<decimal?>(sql); obj = cn.QueryFirstOrDefault<decimal?>(sql);
m.fee_refund = obj ?? 0; m.fee_refund = obj ?? 0;
......
...@@ -1095,7 +1095,7 @@ AND s2.datacenter_col like '%{input.FeeName}' group by s2.platform,s1.website "; ...@@ -1095,7 +1095,7 @@ AND s2.datacenter_col like '%{input.FeeName}' group by s2.platform,s1.website ";
return x; return x;
}).ToList(); }).ToList();
}); });
} }
return data.Sum(x => x.total); return data.Sum(x => x.total);
} }
/// <summary> /// <summary>
...@@ -1552,6 +1552,9 @@ t1.exchange_rate AS ExchangeRate,t1.amountval_rmb AS AmountValRmb,t1.month AS Mo ...@@ -1552,6 +1552,9 @@ t1.exchange_rate AS ExchangeRate,t1.amountval_rmb AS AmountValRmb,t1.month AS Mo
var among_other = GetMonthProfitFeeManagementCostDetail(time, "其中:其他收入").Data; var among_other = GetMonthProfitFeeManagementCostDetail(time, "其中:其他收入").Data;
oldData.among_other_income = Math.Abs(Math.Round(among_other.Count == 0 ? 0 : among_other.Last().AmountRmb.Value, 2)); oldData.among_other_income = Math.Abs(Math.Round(among_other.Count == 0 ? 0 : among_other.Last().AmountRmb.Value, 2));
//其他收入=出口退税+歌戈尔收入+其中:其他收入
oldData.incoming_other = oldData.incoming_refundtax + oldData.incoming_gogirl + oldData.among_other_income;
//管理成本 //管理成本
Console.WriteLine("开始统计管理成本"); Console.WriteLine("开始统计管理成本");
var bl_xg = GetMonthProfitFeeManagementCostDetail(time, "香港百伦科技有限公司").Data; var bl_xg = GetMonthProfitFeeManagementCostDetail(time, "香港百伦科技有限公司").Data;
...@@ -1590,8 +1593,8 @@ t1.exchange_rate AS ExchangeRate,t1.amountval_rmb AS AmountValRmb,t1.month AS Mo ...@@ -1590,8 +1593,8 @@ t1.exchange_rate AS ExchangeRate,t1.amountval_rmb AS AmountValRmb,t1.month AS Mo
oldData.profit_sales = Math.Round(Math.Abs(oldData.amount_sales) - Math.Abs(oldData.cost) - Math.Abs(oldData.fee_sales_count), 2); oldData.profit_sales = Math.Round(Math.Abs(oldData.amount_sales) - Math.Abs(oldData.cost) - Math.Abs(oldData.fee_sales_count), 2);
//销售毛利润》销售利润/总销售额 //销售毛利润》销售利润/总销售额
oldData.rate_profit_sales = Math.Round(Math.Abs(oldData.profit_sales) / Math.Abs(oldData.amount_sales), 2); oldData.rate_profit_sales = Math.Round(Math.Abs(oldData.profit_sales) / Math.Abs(oldData.amount_sales), 2);
//营业利润》销售利润-总管理成本 //营业利润》销售利润-总管理成本-财务费用
oldData.profit = Math.Round(Math.Abs(oldData.profit_sales) - Math.Abs(oldData.managercost_count), 2); oldData.profit = Math.Round(Math.Abs(oldData.profit_sales) - Math.Abs(oldData.managercost_count) - Math.Abs(oldData.fee_finance), 2);
//营业毛利率》营业利润/总销售额 //营业毛利率》营业利润/总销售额
oldData.rate_profit = Math.Round(oldData.profit / Math.Abs(oldData.amount_sales), 2); oldData.rate_profit = Math.Round(oldData.profit / Math.Abs(oldData.amount_sales), 2);
//实际利润》营业利润+加:其他收入+加:营业外收入+减:营业外支出 //实际利润》营业利润+加:其他收入+加:营业外收入+减:营业外支出
......
...@@ -576,14 +576,14 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers ...@@ -576,14 +576,14 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
currency = _currency, currency = _currency,
exchange_rate = _exchangerate exchange_rate = _exchangerate
}); });
var result = new Services.DataWareHouse.PlatformOrderServices().SaveExchangeRate(list);
return Json(new
{
success = string.IsNullOrEmpty(result),
msg = result
});
} }
var result = new Services.DataWareHouse.PlatformOrderServices().SaveExchangeRate(list);
return Json(new
{
success = string.IsNullOrEmpty(result),
msg = result
});
} }
......
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