3 "name": "Pman.Dialog.XtupleShipmentNew",
6 "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleShipmentNew.bjs",
10 "show": "function (_self)\n{\n _this.form.findField('shiphead_location_id').focus();\n}"
16 "title": "Create new Shipment",
18 "xtype": "LayoutDialog",
23 "xtype": "LayoutRegion",
28 "xtype": "ContentPanel",
33 "rendered": "function (form)\n{\n _this.form = form;\n}",
34 "actioncomplete": "function (_self, action)\n{\n if (action.type == 'setdata') {\n // see if there are multiple possilbe targets\n new Pman.Request({\n url : baseURL + '/Roo/cohead',\n method : 'GET',\n params : {\n cohead_id : _this.data.shiphead_order_id,\n _has_multiple_ship : 1\n },\n success : function(res) {\n // if there is one row returned, then assign values, and press OK\n // otherwise.. cary on..\n if (res.total === 1) {\n _this.form.setValues( {\n \n shiphead_location_id : res.data[0].coitem_location_src,\n shiphead_location_id_location_name : res.data[0].coitem_location_src_name, \n shiphead_shipto_id : res.data[0].coitem_shipto_id,\n shiphead_shipto_id_shipto_name : res.data[0].coitem_shipto_id_name\n });\n _this.okButton.fireEvent('click');\n }\n \n },\n failure : function(res) {\n\n Roo.MessageBox.alert(\"Error\", res.errorMsg);\n _this.dialog.hide();\n \n }\n });\n \n \n }\n \n}"
42 "displayField": "location_name",
44 "emptyText": "Select location",
45 "fieldLabel": "From Location",
46 "forceSelection": true,
47 "hiddenName": "shiphead_location_id",
49 "loadingText": "Searching...",
51 "name": "shiphead_location_id_location_name",
53 "qtip": "Select location",
55 "selectOnFocus": true,
56 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{location_name}</b> </div>",
57 "triggerAction": "all",
59 "valueField": "location_id",
66 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n o.params['query[for_cohead_id]'] = _this.data.shiphead_order_id;\n // set more here\n}\n"
71 "|sortInfo": "{ direction : 'ASC', field: 'location_name' }",
79 "|url": "baseURL + '/Roo/location.php'"
83 "xtype": "JsonReader",
87 "totalProperty": "total",
88 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"location_name\",\"type\":\"string\"}]"
97 "displayField": "shipto_name",
99 "emptyText": "Select Ship to name",
101 "forceSelection": true,
102 "hiddenName": "shiphead_shipto_id",
104 "loadingText": "Searching...",
106 "name": "shiphead_shipto_id_shipto_name",
108 "qtip": "Select Ship to name",
110 "selectOnFocus": true,
111 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{shipto_name}</b> </div>",
112 "triggerAction": "all",
114 "valueField": "shipto_id",
121 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params['query[for_cohead_id]'] = _this.data.shiphead_order_id;\n}\n"
126 "|sortInfo": "{ direction : 'ASC', field: 'shipto_name' }",
131 "xtype": "HttpProxy",
134 "|url": "baseURL + '/Roo/shiptoinfo.php'"
138 "xtype": "JsonReader",
142 "totalProperty": "total",
143 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"shipto_name\",\"type\":\"string\"}]"
150 "name": "shiphead_order_id",
155 "name": "shiphead_shipdate",
165 "click": "function (_self, e)\n{\n _this.dialog.hide();\n \n }"
167 "*prop": "buttons[]",
174 "click": "function (_self, e)\n{\n //_this.findField('cuinfo_\n \n // check if customer is filled in.\n if (_this.form.findField('shiphead_location_id').getValue() < 1) {\n Roo.MessageBox.alert(\"Error\", \"Select a source location\");\n return;\n }\n if (_this.form.findField('shiphead_shipto_id').getValue() < 1) {\n Roo.MessageBox.alert(\"Error\", \"Select where to ship to\");\n return;\n }\n\n var rv = _this.form.getFieldValues();\n\n \n Pman.Dialog.XtupleShipment.show(rv ,\n function() { \n _this.dialog.hide();\n _this.callback()\n }\n );\n \n }",
175 "render": "function (_self)\n{\n _this.okButton = _self;\n}"
177 "*prop": "buttons[]",