Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

jinsy 7 years ago
parent
commit
e3619f92ab

+ 5 - 3
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -123,7 +123,8 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             from:'sl_namount',
                             to:'pbd_nowbalance'
                         }],
-                        defaultCondition: "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0" 
+                        defaultCondition: "sl_vendid<>0 and ((sl_kind in ('采购验收单','采购验退单')) or (sl_kind='期初余额' and sl_ym="+
+                                  "'(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0'"
                     });
                 }
             },
@@ -204,7 +205,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
-
+        debugger
         var sum_pd_amount = store1.sum('pd_amount'); // 付款金额合计
         var pb_discounts = viewModel.get('pb_discounts'); // 折扣金额
         var sum_pbd_nowbalance = store2.sum('pbd_nowbalance'); // 本次核销金额合计
@@ -234,7 +235,8 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
         }else{
             c ='';
         }
-        dbfindtrigger.defaultCondition = "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0" + c;
+        dbfindtrigger.defaultCondition="((sl_kind in ('采购验收单','采购验退单')) or (sl_kind='期初余额' and sl_ym="+
+        "(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0" + c
     },
     myInitCopyData: function(formData) {
         var main = formData.main;

+ 4 - 2
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -137,7 +137,8 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             from: 'sl_namount',
                             to: 'rbd_nowbalance'
                         }],
-                        defaultCondition: "sl_custid<>0 and sl_kind in ('期初余额','出货单','销售退货单') and sl_namount<>0"
+                        defaultCondition: "sl_custid<>0 and ((sl_kind in ('出货单','销售退货单')) or (sl_kind='期初余额' and sl_ym="+
+                        "'(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0'"
                     });
 
                 }
@@ -231,7 +232,8 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
         }else{
             c ='';
         }
-        dbfindtrigger.defaultCondition = "sl_custid<>0 and sl_kind in ('期初余额','出货单','销售退货单') and sl_namount<>0" + c;
+        dbfindtrigger.defaultCondition="((sl_kind in ('出货单','销售退货单')) or (sl_kind='期初余额' and sl_ym="+
+        "(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0 " + c
 
     },
     myInitCopyData: function(formData) {