فهرست منبع

核销单:应收转应收、应付转应付修改

dingyl 6 سال پیش
والد
کامیت
2c97bca34c

+ 2 - 2
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -951,11 +951,11 @@ Ext.define('saas.view.money.verification.FormPanel', {
                         ' and sl_ym<=DATE_FORMAT(str_to_date(\'{vc_date}\', \'%Y-%m-%d\'),\'%Y%m\')' +
                         ' and sl_ym<=DATE_FORMAT(str_to_date(\'{vc_date}\', \'%Y-%m-%d\'),\'%Y%m\')' +
                         ' and sl_kind in (\'采购验收单\',\'采购验退单\',\'期初余额\')'
                         ' and sl_kind in (\'采购验收单\',\'采购验退单\',\'期初余额\')'
                     ],
                     ],
-                    receivable_to_receivable: ['ifnull(sl_currency,\'RMB\') = \'{vc_currency}\' and ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+                    receivable_to_receivable: ['ifnull(sl_currency,\'RMB\') = \'{vc_currency}\' and ifnull(sl_custid,0)={vc_custid} and ifnull(sl_namount,0)<>0 ' +
                         ' and sl_ym<=DATE_FORMAT(str_to_date(\'{vc_date}\', \'%Y-%m-%d\'),\'%Y%m\')' +
                         ' and sl_ym<=DATE_FORMAT(str_to_date(\'{vc_date}\', \'%Y-%m-%d\'),\'%Y%m\')' +
                         ' and sl_kind in (\'出货单\',\'销售退货单\',\'期初余额\')'
                         ' and sl_kind in (\'出货单\',\'销售退货单\',\'期初余额\')'
                     ],
                     ],
-                    payable_to_payable: ['ifnull(sl_currency,\'RMB\') = \'{vc_currency}\' and ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0' +
+                    payable_to_payable: ['ifnull(sl_currency,\'RMB\') = \'{vc_currency}\' and ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_namount,0)<>0' +
                         ' and sl_ym<=DATE_FORMAT(str_to_date(\'{vc_date}\', \'%Y-%m-%d\'),\'%Y%m\')' +
                         ' and sl_ym<=DATE_FORMAT(str_to_date(\'{vc_date}\', \'%Y-%m-%d\'),\'%Y%m\')' +
                         ' and sl_kind in (\'采购验收单\',\'采购验退单\',\'期初余额\')'
                         ' and sl_kind in (\'采购验收单\',\'采购验退单\',\'期初余额\')'
                     ]
                     ]

+ 14 - 0
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -119,6 +119,13 @@ Ext.define('saas.view.money.verification.FormPanelController', {
                 },
                 },
                 beforequery: function(f) {
                 beforequery: function(f) {
                     var defaultCondition = this.getDefaultCondition(0);
                     var defaultCondition = this.getDefaultCondition(0);
+                    var form = me.getView(),
+                        viewModel = me.getViewModel();
+                    var kind=viewModel.get('vc_kind');
+                    console.log(kind);
+                    if (kind == 'receivable_to_receivable' || kind == 'payable_to_payable'){
+                        f.dataUrl='/api/money/subledger/dbfindlist';
+                    }
                     if(!defaultCondition) {
                     if(!defaultCondition) {
                         return false;
                         return false;
                     }
                     }
@@ -127,7 +134,14 @@ Ext.define('saas.view.money.verification.FormPanelController', {
                     });
                     });
                 },
                 },
                 beforetriggerclick: function(f) {
                 beforetriggerclick: function(f) {
+                    console.log('beforetriggerclick');
                     var defaultCondition = this.getDefaultCondition(0);
                     var defaultCondition = this.getDefaultCondition(0);
+                    var form = me.getView(),
+                        viewModel = me.getViewModel();
+                    var kind=viewModel.get('vc_kind');
+                    if (kind == 'receivable_to_receivable' || kind == 'payable_to_payable'){
+                        f.dataUrl='/api/money/subledger/dbfindlist';
+                    }
                     if(!defaultCondition) {
                     if(!defaultCondition) {
                         return false;
                         return false;
                     }
                     }