Pman.Dialog.XtupleSalesOrder.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 26 Aug 2014 03:34:22 +0000 (11:34 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 26 Aug 2014 03:34:22 +0000 (11:34 +0800)
Pman.Dialog.XtupleSalesOrder.js

Pman.Dialog.XtupleSalesOrder.bjs
Pman.Dialog.XtupleSalesOrder.js

index e7f8a61..ed71311 100644 (file)
                                                             "readOnly": true,
                                                             "width": 300,
                                                             "xtype": "TextArea",
-                                                            "|update": "function() {\n\n    var c = ['first_name', 'last_name' ] ;\n    var a = [ 'line1', 'line2', 'line3', 'city', 'state', 'country' ];\n    var v = [];\n    Roo.each(c, function(e) {\n        if (_this.data['cohead_shipto_cntct_id_cntct_' +e] && \n            _this.data['cohead_shipto_cntct_id_cntct_' +e].length) {\n            v.push(_this.data['cohead_shipto_cntct_id_cntct_' +e]);\n        }\n    });\n    Roo.each(a, function(e) {\n        if (_this.data['cohead_shipto_cntct_id_cntct_addr_id_addr_' +e] && \n            _this.data['cohead_shipto_cntct_id_cntct_addr_id_addr_' +e].length) { \n            v.push(_this.data['cohead_shipto_cntct_id_cntct_addr_id_addr_' +e]);\n        }\n    });\n\n    this.setValue(v.join(\"\\n\"));\n}\n",
+                                                            "|update": "function() {\n\n    var c = ['first_name', 'last_name' ] ;\n    var a = [ 'line1', 'line2', 'line3', 'city', 'state', 'country' ];\n    var v = [];\n    \n    if (_this.data['cohead_shipto_vend_name'] && _this.data['cohead_shipto_vend_name'].length) {\n         v.push(_this.data['cohead_shipto_vend_name']);\n    }\n        if (_this.data['cohead_shipto_vendaddr_code'] && _this.data['cohead_shipto_vendaddr_code'].length) {\n         v.push(_this.data['cohead_shipto_vendaddr_code']);\n    }\n    Roo.each(c, function(e) {\n        if (_this.data['cohead_shipto_cntct_id_cntct_' +e] && \n            _this.data['cohead_shipto_cntct_id_cntct_' +e].length) {\n            v.push(_this.data['cohead_shipto_cntct_id_cntct_' +e]);\n        }\n    });\n    Roo.each(a, function(e) {\n        if (_this.data['cohead_shipto_cntct_id_cntct_addr_id_addr_' +e] && \n            _this.data['cohead_shipto_cntct_id_cntct_addr_id_addr_' +e].length) { \n            v.push(_this.data['cohead_shipto_cntct_id_cntct_addr_id_addr_' +e]);\n        }\n    });\n\n    this.setValue(v.join(\"\\n\"));\n}\n",
                                                             "|xns": "Roo.form"
                                                         },
                                                         {
index 612d213..f8e8675 100644 (file)
@@ -1378,6 +1378,13 @@ Pman.Dialog.XtupleSalesOrder = {
                                                                 var c = ['first_name', 'last_name' ] ;
                                                                 var a = [ 'line1', 'line2', 'line3', 'city', 'state', 'country' ];
                                                                 var v = [];
+                                                                
+                                                                if (_this.data['cohead_shipto_vend_name'] && _this.data['cohead_shipto_vend_name'].length) {
+                                                                     v.push(_this.data['cohead_shipto_vend_name']);
+                                                                }
+                                                                    if (_this.data['cohead_shipto_vendaddr_code'] && _this.data['cohead_shipto_vendaddr_code'].length) {
+                                                                     v.push(_this.data['cohead_shipto_vendaddr_code']);
+                                                                }
                                                                 Roo.each(c, function(e) {
                                                                     if (_this.data['cohead_shipto_cntct_id_cntct_' +e] && 
                                                                         _this.data['cohead_shipto_cntct_id_cntct_' +e].length) {