Browse Source

代码提交

hy 6 years ago
parent
commit
b1e69c52c5

+ 2 - 2
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -46,8 +46,8 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_TURNPURCHASE_BEFORE(79351, "请先获取UU号(供应商:<u>%s</u>),再进行下单操作"),
     BIZ_NOVENDOR_SAVE(79352, "选择的供应商不存在或已禁用"),
     BIZ_NOCURRENCY_SAVE(79353, "选择的币别不存在"),
-    BIZ_NOPERIOD_UPDATE(79354, "期初日期所在期间结账,不能修改期初金额"),
-    BIZ_NOPERIOD_DELETE(79355, "期初日期所在期间结账,不能删除"),
+    BIZ_NOPERIOD_UPDATE(79354, "期初日期所在期间结账,不能修改期初金额"),
+    BIZ_NOPERIOD_DELETE(79355, "期初日期所在期间结账,不能删除"),
     BIZ_NOCUST_SAVE(79356, "选择的客户不存在或已禁用"),
     BIZ_SAMEVENDAP_SAVE(79357, "已存在相同供应商和币别的期初数据,不能新增"),
     BIZ_SAMECUSTAR_SAVE(79358, "已存在相同客户和币别的期初数据,不能新增"),

+ 10 - 10
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustAramountServiceImpl.java

@@ -352,17 +352,17 @@ public class CustAramountServiceImpl extends CommonBaseServiceImpl<CustAramountM
                         custAramount.setCa_recamount(oldCustAramount.getCa_recamount());
                         custAramount.setCa_preamount(oldCustAramount.getCa_preamount());
                         custAramount.setCa_begindate(oldCustAramount.getCa_begindate());
+                        custAramount.setUpdaterId(companyId);
+                        custAramount.setUpdateTime(new Date());
+                        //期初日期是否已结账
+                        int checkBeginData = getMapper().checkBeginData(sdf.format(custAramount.getCa_begindate()),companyId);
+                        if(checkBeginData > 0){
+                            err.append("第" + (i + 3) + "行 : "+BizExceptionCode.BIZ_NOPERIOD_UPDATE.getMessage()+"!<br/> ");
+                        }
+                        //更新余额
+                        custAramount.setCa_leftamount(custAramount.getCa_beginaramount()-custAramount.getCa_beginprerecamount()+custAramount.getCa_recamount()-custAramount.getCa_preamount());
+                        updateList.add(custAramount);
                     }
-                    custAramount.setUpdaterId(companyId);
-                    custAramount.setUpdateTime(new Date());
-                    //期初日期是否已结账
-                    int checkBeginData = getMapper().checkBeginData(sdf.format(custAramount.getCa_begindate()),companyId);
-                    if(checkBeginData > 0){
-                        err.append("第" + (i + 3) + "行 : "+BizExceptionCode.BIZ_NOPERIOD_UPDATE.getMessage()+"!<br/> ");
-                    }
-                    //更新余额
-                    custAramount.setCa_leftamount(custAramount.getCa_beginaramount()-custAramount.getCa_beginprerecamount()+custAramount.getCa_recamount()-custAramount.getCa_preamount());
-                    updateList.add(custAramount);
                 }else{
                     //新增
                     custAramount.setCreatorId(companyId);

+ 10 - 10
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendApamountServiceImpl.java

@@ -349,17 +349,17 @@ public class VendApamountServiceImpl extends CommonBaseServiceImpl<VendApamountM
                         vendApamount.setVa_payamount(oldVendApamount.getVa_payamount());
                         vendApamount.setVa_preamount(oldVendApamount.getVa_preamount());
                         vendApamount.setVa_begindate(oldVendApamount.getVa_begindate());
+                        vendApamount.setUpdaterId(companyId);
+                        vendApamount.setUpdateTime(new Date());
+                        //期初日期是否已结账
+                        int checkBeginData = getMapper().checkBeginData(sdf.format(vendApamount.getVa_begindate()),companyId);
+                        if(checkBeginData > 0){
+                            err.append("第" + (i + 3) + "行 : "+BizExceptionCode.BIZ_NOPERIOD_UPDATE.getMessage()+"!<br/> ");
+                        }
+                        //更新余额
+                        vendApamount.setVa_leftamount(vendApamount.getVa_beginapamount()-vendApamount.getVa_beginprepayamount()+vendApamount.getVa_payamount()-vendApamount.getVa_preamount());
+                        updateList.add(vendApamount);
                     }
-                    vendApamount.setUpdaterId(companyId);
-                    vendApamount.setUpdateTime(new Date());
-                    //期初日期是否已结账
-                    int checkBeginData = getMapper().checkBeginData(sdf.format(vendApamount.getVa_begindate()),companyId);
-                    if(checkBeginData > 0){
-                        err.append("第" + (i + 3) + "行 : "+BizExceptionCode.BIZ_NOPERIOD_UPDATE.getMessage()+"!<br/> ");
-                    }
-                    //更新余额
-                    vendApamount.setVa_leftamount(vendApamount.getVa_beginapamount()-vendApamount.getVa_beginprepayamount()+vendApamount.getVa_payamount()-vendApamount.getVa_preamount());
-                    updateList.add(vendApamount);
                 }else{
                     //新增
                     vendApamount.setCreatorId(companyId);

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/CustomerCheckView.java

@@ -13,6 +13,10 @@ public class CustomerCheckView {
 
     private  String pi_currency;
 
+    private Double pi_rate;
+
+    private Double pi_mytotal;
+
     private Date pi_date;
 
     private Integer pd_pdno;
@@ -45,6 +49,22 @@ public class CustomerCheckView {
 
     private Double pd_ordertotal;
 
+    public Double getPi_mytotal() {
+        return pi_mytotal;
+    }
+
+    public void setPi_mytotal(Double pi_mytotal) {
+        this.pi_mytotal = pi_mytotal;
+    }
+
+    public Double getPi_rate() {
+        return pi_rate;
+    }
+
+    public void setPi_rate(Double pi_rate) {
+        this.pi_rate = pi_rate;
+    }
+
     public Double getPd_ordertotal(){
         return pd_ordertotal;
     }

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/VendorAcountView.java

@@ -13,6 +13,10 @@ public class VendorAcountView {
 
     private String pi_currency;
 
+    private Double pi_rate;
+
+    private Double pi_mytotal;
+
     private Date pi_date;
 
     private Integer pd_pdno;
@@ -44,6 +48,22 @@ public class VendorAcountView {
     private int ym;
     private Double pd_ordertotal;
 
+    public Double getPi_rate() {
+        return pi_rate;
+    }
+
+    public void setPi_rate(Double pi_rate) {
+        this.pi_rate = pi_rate;
+    }
+
+    public Double getPi_mytotal() {
+        return pi_mytotal;
+    }
+
+    public void setPi_mytotal(Double pi_mytotal) {
+        this.pi_mytotal = pi_mytotal;
+    }
+
     public Double getPd_ordertotal(){
         return pd_ordertotal;
     }

+ 3 - 1
applications/money/money-server/src/main/resources/mapper/CustomerCheckViewMapper.xml

@@ -6,7 +6,9 @@
         <result column="pi_class" property="pi_class" jdbcType="VARCHAR" />
         <result column="pi_custcode" property="pi_custcode" jdbcType="VARCHAR" />
         <result column="pi_custname" property="pi_custname" jdbcType="VARCHAR" />
-        <result column="pi_custname" property="pi_custname" jdbcType="VARCHAR" />
+        <result column="pi_currency" property="pi_currency" jdbcType="VARCHAR" />
+        <result column="pi_rate" property="pi_rate" jdbcType="DOUBLE" />
+        <result column="pi_mytotal" property="pi_mytotal" jdbcType="DOUBLE" />
         <result column="pi_date" property="pi_date" jdbcType="TIMESTAMP" />
         <result column="pd_pdno" property="pd_pdno" jdbcType="INTEGER" />
         <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />

+ 2 - 0
applications/money/money-server/src/main/resources/mapper/VendorAcountViewMapper.xml

@@ -7,6 +7,8 @@
     <result column="pi_vendcode" property="pi_vendcode" jdbcType="VARCHAR" />
     <result column="pi_vendname" property="pi_vendname" jdbcType="VARCHAR" />
     <result column="pi_currency" property="pi_currency" jdbcType="VARCHAR" />
+    <result column="pi_rate" property="pi_rate" jdbcType="DOUBLE" />
+    <result column="pi_mytotal" property="pi_mytotal" jdbcType="DOUBLE" />
     <result column="pi_date" property="pi_date" jdbcType="TIMESTAMP" />
     <result column="pd_pdno" property="pd_pdno" jdbcType="INTEGER" />
     <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />

+ 4 - 4
frontend/saas-web/app/view/money/report/AccountBalance.js

@@ -43,6 +43,10 @@ Ext.define('saas.view.money.report.AccountBalance', {
         text: '业务类型',
         dataIndex: 'kind',
         width: 100
+    },{
+        text: '币别',
+        dataIndex: 'currency',
+        width: 80,
     }, {
         text: '收入(元)',
         dataIndex: 'inamount',
@@ -69,10 +73,6 @@ Ext.define('saas.view.money.report.AccountBalance', {
         summaryRenderer: function(v, d, f, m) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
-    },{
-        text: '币别',
-        dataIndex: 'currency',
-        width: 80,
     }, {
         text: '往来单位',
         dataIndex: 'bname',

+ 31 - 5
frontend/saas-web/app/view/money/report/CustomerCheck.js

@@ -155,15 +155,41 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
-        summaryType: 'sum',
-        summaryLabel: '价税合计',
-        summaryRenderer: function(v) {
-            return saas.util.BaseUtil.numberFormat(v, 2, true);
-        }
+        // summaryType: 'sum',
+        // summaryLabel: '价税合计(本位币)',
+        // summaryRenderer: function(v) {
+        //     return saas.util.BaseUtil.numberFormat(v, 2, true);
+        // }
     },{
         text: '币别',
         dataIndex: 'pi_currency',
         width: 80
+    },{
+        text: '汇率',
+        dataIndex: 'pi_rate',
+        exportFormat: 'Integer',
+        xtype: 'numbercolumn',
+        width: 100,
+        renderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, false);
+        }
+    },{
+        text: '价税合计(本位币)',
+        width: 140,
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'pi_mytotal',
+        renderer : function(v, m, r) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join('');
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryLabel: '价税合计(本位币)',
+        summaryRenderer: function(v,m,r) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        }
     }],
 
     listeners: {

+ 4 - 4
frontend/saas-web/app/view/money/report/OtherIODetail.js

@@ -80,6 +80,10 @@ Ext.define('saas.view.money.report.OtherIODetail', {
         text: '资金账户',
         dataIndex: 'bl_bankname',
         width: 150
+    },{
+        text: '币别',
+        dataIndex: 'bk_currency',
+        width: 80,
     }, {
         text: '收入(元)',
         dataIndex: 'bl_income',
@@ -107,10 +111,6 @@ Ext.define('saas.view.money.report.OtherIODetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '币别',
-        dataIndex: 'bk_currency',
-        width: 80,
-    },{
         text: '往来单位',
         dataIndex: 'bl_assname',
         width: 200,

+ 32 - 6
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -153,18 +153,44 @@ Ext.define('saas.view.money.report.VendorCheck', {
         exportFormat: 'Amount',
         dataIndex: 'pd_ordertotal',
         width: 120,
-        summaryType: 'sum',
-        summaryLabel: '价税合计',
         renderer: function(v) {
-            return saas.util.BaseUtil.numberFormat(v, 2, true);
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join('');
+            return Ext.util.Format.number(v, format);
         },
-        summaryRenderer: function(v) {
-            return saas.util.BaseUtil.numberFormat(v, 2, true);
-        }
+        // summaryType: 'sum',
+        // summaryLabel: '价税合计(本位币)',
+        // summaryRenderer: function(v) {
+        //     return saas.util.BaseUtil.numberFormat(v, 2, true);
+        // }
     },{
         text: '币别',
         dataIndex: 'pi_currency',
         width: 80
+    },{
+        text: '汇率',
+        dataIndex: 'pi_rate',
+        exportFormat: 'Integer',
+        xtype: 'numbercolumn',
+        width: 100,
+        renderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, false);
+        }
+    },{
+        text: '价税合计(本位币)',
+        width: 140,
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'pi_mytotal',
+        renderer : function(v, m, r) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join('');
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryLabel: '价税合计(本位币)'
     }],
 
     listeners: {