Commit 606457a0 by guanzhenshan

调整物流供应商往来统计的公式

parent d0fabc9e
......@@ -175,8 +175,8 @@ group by t1.receive_unit";
item.amount_other = obj.amount_other;
}
//期末 = 期初+发生额-付款额+收款额(负数)+其他金额(手工导入数据)
item.amount_end = item.amount_start + item.amount_happen - item.amount_pay + (item.amount_receipt) + item.amount_other;
//期末 = 期初+发生额-付款额+收款额(绝对值)+其他金额(手工导入数据)
item.amount_end = item.amount_start + item.amount_happen - item.amount_pay + System.Math.Abs(item.amount_receipt) + item.amount_other;
s += ($"('{item.day.ToString("yyyy-MM-dd")}',{item.supplierid},'{item.suppliername}',{item.amount_start},{item.amount_happen},{item.amount_pay},{item.amount_receipt},{item.amount_other},{item.amount_end},'{item.createtime.ToString("yyyy-MM-dd HH:mm:ss")}','{item.lastupdatetime.ToString("yyyy-MM-dd HH:mm:ss")}',{item.lastupdateuserid},'{item.lastupdateusername}'),");
}
......
......@@ -186,7 +186,7 @@ namespace Bailun.DC.Models
[Description("生产库存")]
public decimal? semi_prod_inventory_amount { get; set; }
[Description("自产采购在途")]
[Description("自产采购发货在途")]
public decimal? purchase_pro_amount { get; set; }
/// <summary>
......
......@@ -172,7 +172,7 @@ namespace Bailun.DC.Services
if (obj != null)
{
obj.amount_other = amount;
obj.amount_end = obj.amount_start + obj.amount_happen - obj.amount_pay + (obj.amount_receipt) + obj.amount_other;
obj.amount_end = obj.amount_start + obj.amount_happen - obj.amount_pay + System.Math.Abs(obj.amount_receipt) + obj.amount_other;
cn.Execute("update dc_daily_logistics_supplier_transaction set amount_other=" + obj.amount_other + ",amount_end=" + obj.amount_end + ",lastupdatetime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") +"',lastupdateuserid=" + uid + ",lastupdateusername='" + username + "' where id=" + obj.id);
......@@ -201,7 +201,7 @@ namespace Bailun.DC.Services
if (obj != null)
{
obj.amount_start = amount_start;
obj.amount_end = obj.amount_start + obj.amount_happen - obj.amount_pay + (obj.amount_receipt) + obj.amount_other;
obj.amount_end = obj.amount_start + obj.amount_happen - obj.amount_pay + System.Math.Abs(obj.amount_receipt) + obj.amount_other;
cn.Execute("update dc_daily_logistics_supplier_transaction set amount_other=" + obj.amount_other + ",amount_end=" + obj.amount_end + ",lastupdatetime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',lastupdateuserid=" + uid + ",lastupdateusername='" + username + "' where id=" + obj.id);
amount_start = obj.amount_end;
......
......@@ -542,7 +542,7 @@
<div style="width:8%;"></div>
</div>
<div class="item-row fa fa1" style="width:100%;">
<div style="width:11.5%;color:#bbb;">9.自产采购在途</div>
<div style="width:11.5%;color:#bbb;">9.自产采购发货在途</div>
<div style="width:11.5%;" class="purchase_pro_amount">0</div>
<div style="width:11.5%;" class="purchase_pro_amount">0</div>
<div style="width:11.5%;" class="purchase_pro_amount">0</div>
......
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