Commit c97527f9 authored by 黄奎's avatar 黄奎
parents a307d82b 63d0adc4
......@@ -150,8 +150,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice;
item.NoPaid = item.ALLCommission;
item.Paid = item.PaidCostMoney + item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.GrossProfit = item.AllPrice - item.ALLCommission;
item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
}
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list;
......@@ -325,9 +325,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
new ExcelColumn(value: "其他") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "已付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "应付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "退款金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "实际收入") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "实际支出") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "优惠金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "实际退款金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "其他实际收入") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "其他实际支出") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "毛利") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "分公司名称") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "分公司结算") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
......@@ -352,8 +353,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice;
item.NoPaid = item.ALLCommission;
item.Paid = item.PaidCostMoney + item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.GrossProfit = item.AllPrice - item.ALLCommission;
item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
//item.GrossProfit = item.AllPrice - item.ALLCommission;
//item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
#region 组装数据
int Num = 0;
......@@ -409,12 +412,13 @@ namespace Mall.WebApi.Controllers.AppletWeChat
// datarow.ExcelRows.Add(new ExcelColumn(value: item.ALLCommission.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.Paid.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.NoPaid.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.CouponMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.RefundActual.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.RealMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.PayMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.GrossProfit.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.CompanyName) { });
datarow.ExcelRows.Add(new ExcelColumn(value: Math.Round((item.GrossProfit*item.CompanyProfitRate), 2, MidpointRounding.AwayFromZero).ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: Math.Round((item.GrossProfit * item.CompanyProfitRate), 2, MidpointRounding.AwayFromZero).ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.GrossProfitRate.ToString("#0.00")) { });
slist.Add(datarow);
}
......@@ -498,8 +502,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
// item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice;
item.NoPaid = item.ALLCommission;
item.Paid = item.PaidCostMoney + item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.GrossProfit = item.AllPrice - item.ALLCommission;
item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
//item.GrossProfit = item.AllPrice - item.ALLCommission;
//item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
var retult = new
......@@ -526,6 +532,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
TotalPaid = list.Sum(x => x.Paid),//已付小计
TotalNoPaid = list.Sum(x => x.NoPaid),//未付小计
TotalGrossProfit = list.Sum(x => x.GrossProfit),//毛利小计
TotalRealMoney = list.Sum(x => x.RealMoney),//其他实收
TotalPayMoney = list.Sum(x => x.PayMoney),//其他实付
TotalCouponMoney = list.Sum(x => x.CouponMoney),//优惠金额
TotalCompanyProfit = list.Sum(x => Math.Round((x.GrossProfit * x.CompanyProfitRate), 2, MidpointRounding.AwayFromZero)),//公司结算金额
};
......
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