Browse Source

销售订单更新不含税总额

guq 7 years ago
parent
commit
7a20ec692b

+ 3 - 1
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -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">