Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleTransfer.js
index 9f04d09..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();
                                                     }
@@ -518,6 +525,7 @@ Pman.Dialog.XtupleTransfer = {
                                                             {
                                                                 xtype: 'ComboBox',
                                                                 xns: Roo.form,
+                                                                actionMode : 'fieldEl',
                                                                 allowBlank : true,
                                                                 displayField : 'desc',
                                                                 editable : false,
@@ -633,12 +641,13 @@ Pman.Dialog.XtupleTransfer = {
                                         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();
                                             return;
                                         }
                                         
                                         cm.setHidden(cid('invhist_transfer_item_unit_price'), false);
                                         cm.setHidden(cid('invhist_transfer_item_unit_price_default'), false);
+                                        _this.form.findField('invhist_transfer_price').show();
                                     },
                                     sm : {
                                         xtype: 'CellSelectionModel',