Browse Source

出入库单据修改含税金额字段

zhoudw 7 years ago
parent
commit
cd4ceac0f8
18 changed files with 36 additions and 22 deletions
  1. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  2. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java
  3. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  4. 5 4
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  5. 2 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  6. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  7. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java
  8. 2 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  9. 6 5
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  10. 1 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  11. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  12. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  13. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  14. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  15. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  16. 1 1
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  17. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  18. 1 1
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

+ 2 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -49,6 +49,8 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java

@@ -44,6 +44,8 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -102,6 +102,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

+ 5 - 4
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -21,6 +21,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -654,15 +655,15 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 

+ 2 - 0
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -48,6 +48,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -148,6 +149,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <!--<result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />-->
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java

@@ -49,6 +49,8 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Long pd_whid;
 
     private String pd_whcode;

+ 2 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java

@@ -45,6 +45,8 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Long pd_whid;
 
     private String pd_whcode;
@@ -81,8 +83,6 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
-    private Double pd_ordertotal;
-
     private ProductDTO productDTO;
 
 }

+ 2 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -96,6 +96,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;
@@ -130,7 +132,6 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pd_remark;
 
-    private Double pd_ordertotal;
 
     private Long pd_ioid;
 

+ 6 - 5
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -21,6 +21,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -739,19 +740,19 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <delete id="deleteByInOutNo" >
       DELETE FROM prodiodetail WHERE PD_INOUTNO=#{code} AND PD_PICLASS=#{type} AND COMPANYID=#{companyId}
   </delete>
-</mapper>
+</mapper>

+ 1 - 0
applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -48,6 +48,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -266,7 +266,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             },{
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0, 
                 // editor : {
                 //     xtype : "numberfield",

+ 2 - 2
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -135,7 +135,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 150
         },{
             text: '总金额',
-            dataIndex: 'pi_total',
+            dataIndex: 'pd_ordertotal',
             width: 110
         },{
             text: '单据状态',
@@ -252,7 +252,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -253,7 +253,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             {
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0, 
                 // editor : {
                 //     xtype : "numberfield",

+ 2 - 2
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -138,7 +138,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             width: 150
         },{
             text: '总金额',
-            dataIndex: 'pi_total',
+            dataIndex: 'pd_ordertotal',
             width: 110
         },{
             text: '单据状态',
@@ -255,7 +255,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
                 },
             },{
                 text: '金额',
-                dataIndex: 'pd_total',
+                dataIndex: 'pd_ordertotal',
                 xtype:'numbercolumn',
                 width: 110,
                 renderer : function(v) {

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -224,7 +224,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
            {
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0,
                 // editor : {
                 //     xtype : "numberfield",

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -226,7 +226,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -202,7 +202,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
             {
                 text: "含税金额",
                 xtype: 'numbercolumn',
-                dataIndex: "pd_total",
+                dataIndex: "pd_ordertotal",
                 width: 110.0,
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -220,7 +220,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {