|
|
@@ -42,7 +42,7 @@
|
|
|
<result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
|
|
|
<result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
|
|
|
<association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
|
|
|
- <id column="pr_id" property="id"/>
|
|
|
+ <id column="pr_id" property="pr_id"/>
|
|
|
<result column="pr_code" property="pr_code"/>
|
|
|
<result column="pr_detail" property="pr_detail"/>
|
|
|
<result column="pr_spec" property="pr_spec"/>
|
|
|
@@ -763,16 +763,16 @@ where a.pd_id in (select pd_ioid from prodiodetail where pd_piid=#{id} and pd_pi
|
|
|
|
|
|
<update id="updatePDSaleIN" parameterType="long">
|
|
|
update prodiodetail set
|
|
|
- pd_total=IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),
|
|
|
- pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
|
|
|
- pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0)
|
|
|
+ pd_total=round(IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),2),
|
|
|
+ pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),2),
|
|
|
+ pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0),2)
|
|
|
where pd_piid=#{id}
|
|
|
</update>
|
|
|
<update id="updatePDSaleOut" parameterType="long">
|
|
|
update prodiodetail set
|
|
|
- pd_total=IFNULL(pd_outqty,0)*IFNULL(pd_sendprice,0),
|
|
|
- pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
|
|
|
- pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0)
|
|
|
+ pd_total=round(IFNULL(pd_outqty,0)*IFNULL(pd_sendprice,0),2),
|
|
|
+ pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),0),
|
|
|
+ pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0),0)
|
|
|
where pd_piid=#{id}
|
|
|
</update>
|
|
|
</mapper>
|