소스 검색

销售订单更新不含税总额

guq 7 년 전
부모
커밋
7a20ec692b
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

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