Commit 7f28e323 by guanzhenshan

etsy平台改为预收

parent 4edb12f7
...@@ -7,29 +7,29 @@ namespace Bailun.DC.DailyPlatformReceivable ...@@ -7,29 +7,29 @@ namespace Bailun.DC.DailyPlatformReceivable
{ {
class Program class Program
{ {
//static async Task Main(string[] args) static async Task Main(string[] args)
//{ {
// Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) => var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// { {
// services.AddHostedService<Services>(); services.AddHostedService<Services>();
// }); });
// await builder.RunConsoleAsync(); await builder.RunConsoleAsync();
//} }
static void Main(string[] args) //static void Main(string[] args)
{ //{
var _services = new Services(); // var _services = new Services();
var start = DateTime.Parse("2020-11-30"); // var start = DateTime.Parse("2021-03-01");
while (start.AddDays(1) < DateTime.Now) // while (start.AddDays(1) < DateTime.Now)
{ // {
Console.WriteLine(start); // Console.WriteLine(start);
_services.Init(start); // _services.Init(start);
start = start.AddDays(1); // start = start.AddDays(1);
} // }
} //}
} }
} }
...@@ -7030,15 +7030,15 @@ group by currency"; ...@@ -7030,15 +7030,15 @@ group by currency";
if (type == 1) //Ebay if (type == 1) //Ebay
{ {
sql += " and platform in ('Ebay','shopify') "; sql += " and platform in ('Ebay','shopify','Etsy') ";
sql_start += " and platform in ('Ebay','shopify') "; sql_start += " and platform in ('Ebay','shopify','Etsy') ";
sql_end += " and platform in ('Ebay','shopify') "; sql_end += " and platform in ('Ebay','shopify','Etsy') ";
} }
else if (type == 2) //非Ebay else if (type == 2) //非Ebay
{ {
sql += " and platform!='Ebay' and platform!='shopify' "; sql += " and platform!='Ebay' and platform!='shopify' and platform!='Etsy' ";
sql_start += " and platform!='Ebay' and platform!='shopify' "; sql_start += " and platform!='Ebay' and platform!='shopify' and platform!='Etsy' ";
sql_end += " and platform!='Ebay' and platform!='shopify' "; sql_end += " and platform!='Ebay' and platform!='shopify' and platform!='Etsy' ";
} }
sql += " group by platform"; sql += " group by platform";
...@@ -7102,11 +7102,11 @@ group by currency"; ...@@ -7102,11 +7102,11 @@ group by currency";
if (type == 1) //Ebay if (type == 1) //Ebay
{ {
sql += " and platform in('Ebay','shopify') "; sql += " and platform in('Ebay','shopify','Etsy') ";
} }
else if (type == 2) //非Ebay else if (type == 2) //非Ebay
{ {
sql += " and platform!='Ebay' and platform!='shopify' "; ; sql += " and platform!='Ebay' and platform!='shopify' and platform!='Etsy' "; ;
} }
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString)) using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
...@@ -7143,11 +7143,11 @@ group by currency"; ...@@ -7143,11 +7143,11 @@ group by currency";
if (type == 1) //Ebay if (type == 1) //Ebay
{ {
sql += " and platform in ('Ebay','shopify') "; sql += " and platform in ('Ebay','shopify','Etsy') ";
} }
else if (type == 2) //非Ebay else if (type == 2) //非Ebay
{ {
sql += " and platform!='Ebay' and platform!='shopify' "; sql += " and platform!='Ebay' and platform!='shopify' and platform!='Etsy' ";
} }
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString)) using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
...@@ -7203,7 +7203,7 @@ group by currency"; ...@@ -7203,7 +7203,7 @@ group by currency";
} }
if (obj.platform.ToLower() == "ebay" || obj.platform.ToLower() == "shopify") if (obj.platform.ToLower() == "ebay" || obj.platform.ToLower() == "shopify" || obj.platform.ToLower() == "etsy")
{ {
//期初预收余额+本期收款(订单付款金额)-发货金额-退款(未发货的)+其他 //期初预收余额+本期收款(订单付款金额)-发货金额-退款(未发货的)+其他
obj.amount_end = obj.amount_start + obj.amount_sale_pay - obj.amount_shipping - obj.amount_refund + obj.amount_other; obj.amount_end = obj.amount_start + obj.amount_sale_pay - obj.amount_shipping - obj.amount_refund + obj.amount_other;
...@@ -7288,7 +7288,7 @@ group by currency"; ...@@ -7288,7 +7288,7 @@ group by currency";
if (obj != null) if (obj != null)
{ {
//Ebay预收账款=期初预收余额+本期收款(订单付款金额)-发货金额-退款(未发货的) //Ebay预收账款=期初预收余额+本期收款(订单付款金额)-发货金额-退款(未发货的)
if (obj.platform.ToLower() == "ebay" || obj.platform.ToLower() == "shopify") if (obj.platform.ToLower() == "ebay" || obj.platform.ToLower() == "shopify" || obj.platform.ToLower()=="etsy")
{ {
obj.amount_start = m.amount_end; obj.amount_start = m.amount_end;
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<div class="ibox-content m-b-sm border-bottom"> <div class="ibox-content m-b-sm border-bottom">
<div class="alert alert-warning"> <div class="alert alert-warning">
说明:<br /> 说明:<br />
Ebay预收账款 = 期初预收余额+本期收款(订单付款金额)-发货金额-退款(未发货的)+其他<br /> 预收账款(ebay、shopify、etsy) = 期初预收余额+本期收款(订单付款金额)-发货金额-退款(未发货的)+其他<br />
非Ebay应收账款 = 期初应收余额+本期销售收入-平台扣费-放款金额-退款金额+其他 应收账款 = 期初应收余额+本期销售收入-平台扣费-放款金额-退款金额+其他
</div> </div>
</div> </div>
<div class="ibox-content m-b-sm border-bottom"> <div class="ibox-content m-b-sm border-bottom">
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
<div class="form-group"> <div class="form-group">
<label>类型</label> <label>类型</label>
<select id="type" name="type" class="form-control" style="width:160px;"> <select id="type" name="type" class="form-control" style="width:160px;">
<option value="1">Ebay和shopify</option> <option value="1">预收</option>
<option value="2">非Ebay</option> <option value="2">应收</option>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
......
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