Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleTransfer.js
index 1bebaaa..a4728d7 100644 (file)
@@ -69,6 +69,7 @@ Pman.Dialog.XtupleTransfer = {
                                                    Roo.log('setdata');
                                                    Roo.log(_this.data);       
                                                    // reversal...
+                                                   _this.toLocation._is_internalcompany = false;
                                                    _this.grid.setColumns();
                                                    _this.saveBtn.show();            
                                                    if (_this.data.createFromRev) {
@@ -225,6 +226,12 @@ Pman.Dialog.XtupleTransfer = {
                                                     this.findField('_roo_office').setValue(  _this.data._roo_office );
                                                     Roo.log(action);
                                                     _this.data = action.result.data;
+                                                    
+                                                    _this.toLocation._is_internalcompany = true;
+                                                    if(!_this.data.cust_to_internalcompany || !_this.data.cust_to_internalcompany.length){
+                                                        _this.toLocation._is_internalcompany = false;
+                                                    }
+                                                    
                                                     if(_this.data.invhist_transfer_void){
                                                         _this.saveBtn.hide();
                                                     }
@@ -631,7 +638,7 @@ Pman.Dialog.XtupleTransfer = {
                                             return cm.getIndexByDataIndex(str);
                                         }
                                         
-                                        if((!_this.data.cust_to_internalcompany || !_this.data.cust_to_internalcompany.length) && (typeof(_this.toLocation._is_internalcompany) == 'undefined' || !_this.toLocation._is_internalcompany)){
+                                        if((!_this.data.cust_to_internalcompany || !_this.data.cust_to_internalcompany.length) && !_this.toLocation._is_internalcompany){
                                             cm.setHidden(cid('invhist_transfer_item_unit_price'), true);
                                             cm.setHidden(cid('invhist_transfer_item_unit_price_default'), true);
                                             _this.form.findField('invhist_transfer_price').hide();