Commit f4cc02f3 by guanzhenshan

调整应收账款自动更新资产负债表

parent ec26c87c
......@@ -5422,6 +5422,8 @@ group by currency";
if (result>0)
{
UpdateLogisticsEndAmount(obj.day, ReceivablesCount(obj.day).Item1, "accountsReceivableUpdate");
UpdateReceivableEndAmount(obj, cn, uid, username);
}
......@@ -5449,7 +5451,7 @@ group by currency";
if (obj != null)
{
//Ebay预收账款=期初预收余额+本期收款(订单付款金额)-发货金额-退款(未发货的)
if (obj.platform.ToLower() == "ebay")
if (obj.platform.ToLower() == "ebay" || obj.platform.ToLower() == "shopify")
{
obj.amount_start = m.amount_end;
......@@ -5461,7 +5463,7 @@ group by currency";
cn.Update<dc_daily_receivable>(obj);
}
//非Ebay 应收账款=期初应收余额+本期销售收入-平台扣费-放款金额-退款金额+其他
else if (obj.platform.ToLower() != "ebay")
else
{
obj.amount_start = m.amount_end;
obj.amount_end = obj.amount_start + obj.amount_sale_shipping - obj.amount_platformfee - obj.amount_incoming - obj.amount_refund + obj.amount_other;
......@@ -5470,7 +5472,9 @@ group by currency";
obj.lastupdateusername = username;
cn.Update<dc_daily_receivable>(obj);
}
UpdateLogisticsEndAmount(obj.day, ReceivablesCount(obj.day).Item1, "accountsReceivableUpdate");
UpdateReceivableEndAmount(obj, cn, uid, username);
}
......
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