|
|
@@ -21,6 +21,7 @@
|
|
|
<result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
|
|
|
<result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
|
|
|
<result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
|
|
|
+ <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
|
|
|
<result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
|
|
|
<result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
|
|
|
<result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
|
|
|
@@ -654,15 +655,15 @@
|
|
|
|
|
|
<update id="calcProdIn">
|
|
|
update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
|
|
|
- update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2) where pd_piid = #{pi_id,jdbcType=INTEGER};
|
|
|
- update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2) where pi_id = #{pi_id,jdbcType=INTEGER};
|
|
|
+ update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2) where pd_piid = #{pi_id,jdbcType=INTEGER};
|
|
|
+ update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2) where pi_id = #{pi_id,jdbcType=INTEGER};
|
|
|
update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2) where pi_id = #{pi_id,jdbcType=INTEGER};
|
|
|
</update>
|
|
|
|
|
|
<update id="calcProdOut">
|
|
|
update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
|
|
|
- update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2) where pd_piid = #{pi_id,jdbcType=INTEGER};
|
|
|
- update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2) where pi_id = #{pi_id,jdbcType=INTEGER};
|
|
|
+ update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2) where pd_piid = #{pi_id,jdbcType=INTEGER};
|
|
|
+ update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2) where pi_id = #{pi_id,jdbcType=INTEGER};
|
|
|
update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2) where pi_id = #{pi_id,jdbcType=INTEGER};
|
|
|
</update>
|
|
|
|