|
|
@@ -418,7 +418,9 @@
|
|
|
select sa_code from sale where sa_id = #{id} and IFNULL(sa_statuscode,'UNAUDITED')='UNAUDITED'
|
|
|
</select>
|
|
|
<update id="updateTotal" parameterType="long">
|
|
|
- update sale a set sa_total=(select sum(sd_price*sd_qty) from saledetail b where b.sd_said=a.sa_id ) where sa_id=#{id};
|
|
|
+ update sale a set sa_total=
|
|
|
+ (select sum(sd_price*sd_qty) from saledetail b where b.sd_said=a.sa_id ),sa_nettotal=(select sum(sd_netprice*sd_qty)
|
|
|
+ from saledetail where sd_said=sa_id) where sa_id=#{id};
|
|
|
</update>
|
|
|
|
|
|
<update id="updateTotalAndNetPrice" parameterType="long">
|