3 "name": "Pman.Tab.XtupleSalesShipment",
4 "parent": "Pman.Tab.XtupleSales",
6 "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleSalesShipment.bjs",
11 ".builderCfg": "{\"cols\":[{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_sfstatus\",\"columnshort\":\"shiphead_sfstatus\",\"ctype\":\"bpchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"shiphead_notes\"],\"table\":\"shiphead\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
12 "title": "Fullfillments",
15 "tableName": "shiphead",
19 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
24 "|render": "function() \n{\n _this.grid = this; \n try { \n _this.dialog = Pman.Dialog.XtupleSalesOrder;\n } catch(e) {}\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}",
25 "|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n \n var d = this.getDataSource().getAt(rowIndex).data;\n _this.dialog.show( {\n cohead_id : d.shiphead_order_id\n \n }, function() {\n _this.grid.footer.onClick('refresh');\n Pman.Tab.XtupleSales.grid.footer.onClick('first');\n }); \n}\n"
28 ".builderCfg": "{\"cols\":[{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_sfstatus\",\"columnshort\":\"shiphead_sfstatus\",\"ctype\":\"bpchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"shiphead_notes\"],\"table\":\"shiphead\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
29 "autoExpandColumn": "shiphead_notes",
36 "beforeload": "function (_self, options)\n{\n options.params._status = _this.status.getValue();\n var cust = _this.custSel.getValue();\n if (cust *1) {\n \n \n }\n}"
38 "*prop": "dataSource",
41 "|sortInfo": "{ field : 'shiphead_shipdate', direction: 'DESC' }",
48 "|url": "baseURL + '/Roo/shiphead.php'",
53 "xtype": "JsonReader",
54 "totalProperty": "total",
56 ".builderCfg": "{\"cols\":[{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_sfstatus\",\"columnshort\":\"shiphead_sfstatus\",\"ctype\":\"bpchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"shiphead_notes\"],\"table\":\"shiphead\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
59 "|fields": "[\n {\n 'name': 'shiphead_order_id',\n 'type': 'int'\n },\n {\n 'name': 'shiphead_number',\n 'type': 'string'\n },\n {\n 'name': 'shiphead_notes',\n 'type': 'string'\n },\n {\n 'name': 'shiphead_shipped',\n 'type': 'boolean'\n },\n {\n 'name': 'shiphead_shipdate',\n 'type': 'date'\n },\n {\n 'name': 'shiphead_sfstatus'\n }\n]"
65 "xtype": "PagingToolbar",
68 "displayMsg": "Displaying shiphead{0} - {1} of {2}",
69 "emptyMsg": "No shiphead found",
74 "click": "function (_self, e)\n{\n new Pman.Download({\n grid: _this.grid\n });\n Roo.MessageBox.alert(\"Notice\", \"Download should start soon\");\n}"
89 "render": "function (_self)\n{\n _this.invcnumber = _self;\n}",
90 "specialkey": "function (_self, e)\n{\n _this.grid.footer.onClick('first');\n}"
92 "emptyText": "Invoice #",
99 "render": "function (_self)\n{\n _this.ordernumber = _self;\n}",
100 "select": "function (combo, record, index)\n{\n Roo.log('select');\n _this.grid.footer.onClick('first');\n}"
103 "displayField": "invchead_ordernumber",
105 "emptyText": "Order",
106 "fieldLabel": "ordernumber",
107 "forceSelection": true,
108 "hiddenName": "invchead_id",
110 "loadingText": "Searching...",
112 "name": "invchead_ordernumber",
114 "qtip": "Select invchead",
115 "queryParam": "query[invchead_ordernumber]",
116 "selectOnFocus": true,
117 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{invchead_ordernumber}</b> </div>",
118 "triggerAction": "all",
119 "valueField": "invchead_ordernumber",
127 "|sortInfo": "{ direction : 'ASC', field: 'invchead_ordernumber' }",
131 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
136 "xtype": "HttpProxy",
139 "|url": "baseURL + '/Roo/invchead.php'"
143 "xtype": "JsonReader",
147 "totalProperty": "total",
148 "|fields": "[{\"name\":\"invchead_id\",\"type\":\"int\"},\"invchead_ordernumber\"]"
156 "render": "function (_self)\n{\n _this.customer = _self;\n}",
157 "select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}"
160 "displayField": "cust_name",
162 "emptyText": "Select Customer",
163 "fieldLabel": "cust_name",
164 "forceSelection": true,
165 "hiddenName": "cust_id",
167 "loadingText": "Searching...",
171 "qtip": "Select custinfo",
172 "queryParam": "query[cust_name]",
173 "selectOnFocus": true,
174 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{cust_name}</b> </div>",
175 "triggerAction": "all",
176 "valueField": "cust_id",
184 "|sortInfo": "{ direction : 'ASC', field: 'cust_name' }",
188 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
193 "xtype": "HttpProxy",
196 "|url": "baseURL + '/Roo/custinfo.php'"
200 "xtype": "JsonReader",
204 "totalProperty": "total",
205 "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]"
213 "render": "function (_self)\n{\n _this.status = _self;\n}",
214 "beforeselect": "function (combo, record, index)\n{\n (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}"
217 "displayField": "fname",
219 "fieldLabel": "Status",
220 "hiddenName": "status",
224 "triggerAction": "all",
226 "valueField": "ftype",
233 "xtype": "SimpleStore",
234 "|data": "[ \n [ 'U', \"Unpaid\"],\n [ 'NV' , \"Not Void Only\"],\n [ 'V' , \"Void Only\"], \n [ 'A', \"All\"] \n]\n",
235 "|fields": "[ 'ftype', 'fname']",
243 "|xns": "Roo.Toolbar"
247 "select": "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}",
248 "render": "function (_self)\n{\n _this.fromDate = _self;\n}"
251 "xtype": "DateField",
257 "|xns": "Roo.Toolbar"
261 "select": "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}",
262 "render": "function (_self)\n{\n _this.toDate = _self;\n}"
265 "xtype": "DateField",
269 "|xns": "Roo.Toolbar",
274 "|click": "function ()\n{\n\n if (!Pman.hasPerm('Xtuple.InvoiceAll', 'S')) {\n Roo.MessageBox.alert(\"Error\", \"You do not have permissions to do that, please contact the administrator to void invoices, or edit the sales order.\");\n return;\n \n }\n \n \n var sel = _this.grid.getSelectionModel().getSelected();\n if (!sel) {\n Roo.MessageBox.alert(\"Error\", \"Select a invoice\");\n return;\n }\n // check current status of shipment..\n \n Roo.MessageBox.confirm(\"Are you sure\", \"Are you sure you want to VOID that invoice?\",\n function(r) {\n if (r != 'yes') {\n return;\n }\n new Pman.Request({\n mask : 'Sending',\n url : baseURL + '/Roo/invchead',\n method : 'POST',\n params : {\n invchead_id : sel.data.invchead_id,\n _void : 1\n },\n success : function() {\n _this.grid.footer.onClick('refresh');\n }\n })\n \n }\n );\n \n \n \n}"
276 "cls": "x-btn-text-icon",
277 "text": "Void Invoice",
279 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
280 "|xns": "Roo.Toolbar"
291 "select": "function (combo, record, index)\n{\n (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}",
292 "render": "function (_self)\n{\n _this.custSel = _self;\n}"
295 "displayField": "cust_name",
297 "emptyText": "Select custinfo",
298 "fieldLabel": "cust_name",
299 "forceSelection": false,
300 "hiddenName": "cust_id",
302 "loadingText": "Searching...",
306 "qtip": "Select Customer",
307 "queryParam": "query[cust_name]",
308 "selectOnFocus": true,
309 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{cust_name}</b> </div>",
310 "triggerAction": "all",
312 "valueField": "cust_id",
319 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
324 "|sortInfo": "{ direction : 'ASC', field: 'shiphead_shipdate' }",
329 "xtype": "HttpProxy",
332 "|url": "baseURL + '/Roo/custinfo.php'"
336 "xtype": "JsonReader",
340 "totalProperty": "total",
341 "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]"
349 "render": "function (_self)\n{\n _this.status = _self;\n}",
350 "beforeselect": "function (combo, record, index)\n{\n (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}"
353 "displayField": "fname",
355 "fieldLabel": "Status",
356 "hiddenName": "status",
360 "triggerAction": "all",
362 "valueField": "ftype",
369 "xtype": "SimpleStore",
370 "|data": "[ \n [ 'S', \"Shipped\"],\n [ 'R' , \"Reserved\"],\n [ 'V' , \"Void Only\"], \n [ 'A', \"All\"] \n]\n",
371 "|fields": "[ 'ftype', 'fname']",
379 "|xns": "Roo.Toolbar"
383 "select": "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}",
384 "render": "function (_self)\n{\n _this.fromDate = _self;\n}"
387 "xtype": "DateField",
393 "|xns": "Roo.Toolbar"
398 "*prop": "colModel[]",
399 ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"}",
400 "dataIndex": "shiphead_order_id_cohead_number",
404 "xtype": "ColumnModel",
405 "|renderer": "function(v) { return String.format('{0}', v); }",
409 "*prop": "colModel[]",
410 "dataIndex": "shiphead_custinfo_cust_name",
411 "header": "Customer",
413 "xtype": "ColumnModel",
414 "|renderer": "function(v) { return String.format('{0}', v); }",
418 "*prop": "colModel[]",
419 ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"}",
420 "dataIndex": "shiphead_number",
421 "header": "Shipment#",
424 "xtype": "ColumnModel",
425 "|renderer": "function(v) { return String.format('{0}', v); }",
429 "xtype": "ColumnModel",
430 ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}",
433 "dataIndex": "shiphead_notes",
434 "|renderer": "function(v) { return String.format('{0}', v); }",
436 "*prop": "colModel[]"
439 "*prop": "colModel[]",
440 "dataIndex": "shiphead_delivery_note",
441 "header": "Delivery Note#",
443 "xtype": "ColumnModel",
444 "|renderer": "function(v) { return String.format('{0}', v); }",
448 "*prop": "colModel[]",
449 ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}",
450 "dataIndex": "shiphead_shipped",
453 "xtype": "ColumnModel",
454 "|renderer": "function(v,x,r) { \n\n\n\n \n if (r.json.shiphead_shipdate.length) {\n \n if (r.json.shiphead_shipped) {\n return \"Confirmed\";\n }\n \n return 'Draft';\n }\n \n return 'VOID';\n \n\n}",
458 "*prop": "colModel[]",
459 ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}",
460 "dataIndex": "shiphead_shipdate",
461 "header": "shipdate",
464 "xtype": "ColumnModel",
465 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",