Jelajahi Sumber

fix bug: #94036 已定价额加上升贴水

zou.yingbin 4 tahun lalu
induk
melakukan
82d07c537d
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      models/ermcp.go

+ 2 - 2
models/ermcp.go

@@ -258,8 +258,8 @@ func (r *ErmcpModel) buildSql(nContractType, nQueryType int32) string {
 		"       g2.goodsname," +
 		"       e.enumdicname," +
 		"       t.contracttype," +
-		"       t.pricedamount," +
-		"       case when t.pricedqty > 0 then t.pricedamount/t.pricedqty else 0 end pricedAvg," +
+		"       t.pricedamount + t.pricedqty * t.pricemove as pricedamount," +
+		"       case when t.pricedqty > 0 then (t.pricedamount + t.pricedqty * t.pricemove)/t.pricedqty else 0 end pricedAvg," +
 		"       t.ReckonRealQty," +
 		"       t.ReckonOtherAmount," +
 		"       t.ReckonAdjustAmount," +