|
@@ -744,7 +744,7 @@ and pi_said=#{id} GROUP BY pd_ioid) b where IFNULL(b.pd_ioid ,0)= a.pd_id ),0)
|
|
|
where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class='销售出货单')
|
|
where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class='销售出货单')
|
|
|
</update>
|
|
</update>
|
|
|
<update id="updateSaleYqty" parameterType="long">
|
|
<update id="updateSaleYqty" parameterType="long">
|
|
|
- update saledtail
|
|
|
|
|
|
|
+ update saledetail
|
|
|
set a.sd_yqty =IFNULL((
|
|
set a.sd_yqty =IFNULL((
|
|
|
select b.pd_ounqty from (select pi_said,sum(pd_outqty) pd_outqty
|
|
select b.pd_ounqty from (select pi_said,sum(pd_outqty) pd_outqty
|
|
|
from prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售出货单'
|
|
from prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售出货单'
|