@@ -752,6 +752,13 @@
where pd_piid=#{id} order by pd_pdno
</select>
+ <update id="updateSaleYqty" parameterType="long">
+ update saledetail a set a.sd_yqty =IFNULL( ( select b.pd_outqty from (
+ select pd_sdid,sum(pd_outqty) pd_outqty from prodiodetail left join
+ prodinout on pd_piid = pi_id where pd_piclass='出货单' and pi_said=#{id}
+ GROUP BY pd_sdid) b where IFNULL(b.pd_sdid ,0) = a.sd_id ),0) where a.sd_said =#{id}
+ </update>
+
<update id="updatePDSaleIN" parameterType="long">
update prodiodetail set
pd_ordertotal=round(IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),2),