Pman.Tab.XtupleSalesShipment.bjs
[Pman.Xtuple] / Pman.Tab.XtupleSalesShipment.bjs
1 {
2     "id": "roo-file-396",
3     "name": "Pman.Tab.XtupleSalesShipment",
4     "parent": "Pman.Tab.XtupleSales",
5     "title": "",
6     "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleSalesShipment.bjs",
7     "items": [
8         {
9             "|xns": "Roo",
10             "xtype": "GridPanel",
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",
13             "fitToframe": true,
14             "fitContainer": true,
15             "tableName": "shiphead",
16             "background": true,
17             "region": "center",
18             "listeners": {
19                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
20             },
21             "items": [
22                 {
23                     "listeners": {
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"
26                     },
27                     "*prop": "grid",
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",
30                     "loadMask": true,
31                     "xtype": "Grid",
32                     "|xns": "Roo.grid",
33                     "items": [
34                         {
35                             "listeners": {
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}"
37                             },
38                             "*prop": "dataSource",
39                             "remoteSort": true,
40                             "xtype": "Store",
41                             "|sortInfo": "{ field : 'shiphead_shipdate', direction: 'DESC' }",
42                             "|xns": "Roo.data",
43                             "items": [
44                                 {
45                                     "*prop": "proxy",
46                                     "xtype": "HttpProxy",
47                                     "method": "GET",
48                                     "|url": "baseURL + '/Roo/shiphead.php'",
49                                     "|xns": "Roo.data"
50                                 },
51                                 {
52                                     "|xns": "Roo.data",
53                                     "xtype": "JsonReader",
54                                     "totalProperty": "total",
55                                     "root": "data",
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\"}",
57                                     "*prop": "reader",
58                                     "id": "id",
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]"
60                                 }
61                             ]
62                         },
63                         {
64                             "*prop": "footer",
65                             "xtype": "PagingToolbar",
66                             "pageSize": 25,
67                             "displayInfo": true,
68                             "displayMsg": "Displaying shiphead{0} - {1} of {2}",
69                             "emptyMsg": "No shiphead found",
70                             "|xns": "Roo",
71                             "items": [
72                                 {
73                                     "listeners": {
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}"
75                                     },
76                                     "text": "Download",
77                                     "xtype": "Button",
78                                     "|xns": "Roo.Toolbar"
79                                 }
80                             ]
81                         },
82                         {
83                             "*prop": "toolbar",
84                             "xtype": "Toolbar",
85                             "|xns": "Roo",
86                             "items": [
87                                 {
88                                     "listeners": {
89                                         "render": "function (_self)\n{\n    _this.invcnumber = _self;\n}",
90                                         "specialkey": "function (_self, e)\n{\n    _this.grid.footer.onClick('first');\n}"
91                                     },
92                                     "emptyText": "Invoice #",
93                                     "width": 70,
94                                     "xtype": "TextField",
95                                     "|xns": "Roo.form"
96                                 },
97                                 {
98                                     "listeners": {
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}"
101                                     },
102                                     "allowBlank": true,
103                                     "displayField": "invchead_ordernumber",
104                                     "editable": true,
105                                     "emptyText": "Order",
106                                     "fieldLabel": "ordernumber",
107                                     "forceSelection": true,
108                                     "hiddenName": "invchead_id",
109                                     "listWidth": 400,
110                                     "loadingText": "Searching...",
111                                     "minChars": 2,
112                                     "name": "invchead_ordernumber",
113                                     "pageSize": 20,
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",
120                                     "width": 150,
121                                     "xtype": "ComboBox",
122                                     "|xns": "Roo.form",
123                                     "items": [
124                                         {
125                                             "*prop": "store",
126                                             "|xns": "Roo.data",
127                                             "|sortInfo": "{ direction : 'ASC', field: 'invchead_ordernumber' }",
128                                             "xtype": "Store",
129                                             "remoteSort": true,
130                                             "listeners": {
131                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
132                                             },
133                                             "items": [
134                                                 {
135                                                     "*prop": "proxy",
136                                                     "xtype": "HttpProxy",
137                                                     "method": "GET",
138                                                     "|xns": "Roo.data",
139                                                     "|url": "baseURL + '/Roo/invchead.php'"
140                                                 },
141                                                 {
142                                                     "*prop": "reader",
143                                                     "xtype": "JsonReader",
144                                                     "|xns": "Roo.data",
145                                                     "id": "invchead_id",
146                                                     "root": "data",
147                                                     "totalProperty": "total",
148                                                     "|fields": "[{\"name\":\"invchead_id\",\"type\":\"int\"},\"invchead_ordernumber\"]"
149                                                 }
150                                             ]
151                                         }
152                                     ]
153                                 },
154                                 {
155                                     "listeners": {
156                                         "render": "function (_self)\n{\n    _this.customer = _self;\n}",
157                                         "select": "function (combo, record, index)\n{\n    _this.grid.footer.onClick('first');\n}"
158                                     },
159                                     "allowBlank": true,
160                                     "displayField": "cust_name",
161                                     "editable": true,
162                                     "emptyText": "Select Customer",
163                                     "fieldLabel": "cust_name",
164                                     "forceSelection": true,
165                                     "hiddenName": "cust_id",
166                                     "listWidth": 400,
167                                     "loadingText": "Searching...",
168                                     "minChars": 2,
169                                     "name": "cust_name",
170                                     "pageSize": 20,
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",
177                                     "width": 200,
178                                     "xtype": "ComboBox",
179                                     "|xns": "Roo.form",
180                                     "items": [
181                                         {
182                                             "*prop": "store",
183                                             "|xns": "Roo.data",
184                                             "|sortInfo": "{ direction : 'ASC', field: 'cust_name' }",
185                                             "xtype": "Store",
186                                             "remoteSort": true,
187                                             "listeners": {
188                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
189                                             },
190                                             "items": [
191                                                 {
192                                                     "*prop": "proxy",
193                                                     "xtype": "HttpProxy",
194                                                     "method": "GET",
195                                                     "|xns": "Roo.data",
196                                                     "|url": "baseURL + '/Roo/custinfo.php'"
197                                                 },
198                                                 {
199                                                     "*prop": "reader",
200                                                     "xtype": "JsonReader",
201                                                     "|xns": "Roo.data",
202                                                     "id": "cust_id",
203                                                     "root": "data",
204                                                     "totalProperty": "total",
205                                                     "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]"
206                                                 }
207                                             ]
208                                         }
209                                     ]
210                                 },
211                                 {
212                                     "listeners": {
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}"
215                                     },
216                                     "allowBlank": false,
217                                     "displayField": "fname",
218                                     "editable": false,
219                                     "fieldLabel": "Status",
220                                     "hiddenName": "status",
221                                     "listWidth": 200,
222                                     "mode": "local",
223                                     "name": "status",
224                                     "triggerAction": "all",
225                                     "value": "A",
226                                     "valueField": "ftype",
227                                     "width": 100,
228                                     "xtype": "ComboBox",
229                                     "|xns": "Roo.form",
230                                     "items": [
231                                         {
232                                             "*prop": "store",
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']",
236                                             "|xns": "Roo.data"
237                                         }
238                                     ]
239                                 },
240                                 {
241                                     "text": "From:",
242                                     "xtype": "TextItem",
243                                     "|xns": "Roo.Toolbar"
244                                 },
245                                 {
246                                     "listeners": {
247                                         "select": "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}",
248                                         "render": "function (_self)\n{\n    _this.fromDate = _self;\n}"
249                                     },
250                                     "format": "Y-m-d",
251                                     "xtype": "DateField",
252                                     "|xns": "Roo.form"
253                                 },
254                                 {
255                                     "text": " To:",
256                                     "xtype": "TextItem",
257                                     "|xns": "Roo.Toolbar"
258                                 },
259                                 {
260                                     "listeners": {
261                                         "select": "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}",
262                                         "render": "function (_self)\n{\n    _this.toDate = _self;\n}"
263                                     },
264                                     "format": "Y-m-d",
265                                     "xtype": "DateField",
266                                     "|xns": "Roo.form"
267                                 },
268                                 {
269                                     "|xns": "Roo.Toolbar",
270                                     "xtype": "Fill"
271                                 },
272                                 {
273                                     "listeners": {
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}"
275                                     },
276                                     "cls": "x-btn-text-icon",
277                                     "text": "Void Invoice",
278                                     "xtype": "Button",
279                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
280                                     "|xns": "Roo.Toolbar"
281                                 }
282                             ]
283                         },
284                         {
285                             "*prop": "toolbar",
286                             "xtype": "Toolbar",
287                             "|xns": "Roo",
288                             "items": [
289                                 {
290                                     "listeners": {
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}"
293                                     },
294                                     "allowBlank": false,
295                                     "displayField": "cust_name",
296                                     "editable": true,
297                                     "emptyText": "Select custinfo",
298                                     "fieldLabel": "cust_name",
299                                     "forceSelection": false,
300                                     "hiddenName": "cust_id",
301                                     "listWidth": 400,
302                                     "loadingText": "Searching...",
303                                     "minChars": 2,
304                                     "name": "cust_name",
305                                     "pageSize": 20,
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",
311                                     "typeAhead": true,
312                                     "valueField": "cust_id",
313                                     "width": 300,
314                                     "xtype": "ComboBox",
315                                     "|xns": "Roo.form",
316                                     "items": [
317                                         {
318                                             "listeners": {
319                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
320                                             },
321                                             "*prop": "store",
322                                             "remoteSort": true,
323                                             "xtype": "Store",
324                                             "|sortInfo": "{ direction : 'ASC', field: 'shiphead_shipdate' }",
325                                             "|xns": "Roo.data",
326                                             "items": [
327                                                 {
328                                                     "*prop": "proxy",
329                                                     "xtype": "HttpProxy",
330                                                     "method": "GET",
331                                                     "|xns": "Roo.data",
332                                                     "|url": "baseURL + '/Roo/custinfo.php'"
333                                                 },
334                                                 {
335                                                     "*prop": "reader",
336                                                     "xtype": "JsonReader",
337                                                     "|xns": "Roo.data",
338                                                     "id": "cust_id",
339                                                     "root": "data",
340                                                     "totalProperty": "total",
341                                                     "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]"
342                                                 }
343                                             ]
344                                         }
345                                     ]
346                                 },
347                                 {
348                                     "listeners": {
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}"
351                                     },
352                                     "allowBlank": false,
353                                     "displayField": "fname",
354                                     "editable": false,
355                                     "fieldLabel": "Status",
356                                     "hiddenName": "status",
357                                     "listWidth": 200,
358                                     "mode": "local",
359                                     "name": "status",
360                                     "triggerAction": "all",
361                                     "value": "S",
362                                     "valueField": "ftype",
363                                     "width": 100,
364                                     "xtype": "ComboBox",
365                                     "|xns": "Roo.form",
366                                     "items": [
367                                         {
368                                             "*prop": "store",
369                                             "xtype": "SimpleStore",
370                                             "|data": "[ \n    [ 'S', \"Shipped\"],\n    [ 'R' , \"Reserved\"],\n    [ 'V' , \"Void Only\"],    \n    [ 'A', \"All\"] \n]\n",
371                                             "|fields": "[  'ftype', 'fname']",
372                                             "|xns": "Roo.data"
373                                         }
374                                     ]
375                                 },
376                                 {
377                                     "text": "From:",
378                                     "xtype": "TextItem",
379                                     "|xns": "Roo.Toolbar"
380                                 },
381                                 {
382                                     "listeners": {
383                                         "select": "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}",
384                                         "render": "function (_self)\n{\n    _this.fromDate = _self;\n}"
385                                     },
386                                     "format": "Y-m-d",
387                                     "xtype": "DateField",
388                                     "|xns": "Roo.form"
389                                 },
390                                 {
391                                     "text": " To:",
392                                     "xtype": "TextItem",
393                                     "|xns": "Roo.Toolbar"
394                                 },
395                                 {
396                                     "listeners": {
397                                         "select": "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}",
398                                         "render": "function (_self)\n{\n    _this.toDate = _self;\n}"
399                                     },
400                                     "format": "Y-m-d",
401                                     "xtype": "DateField",
402                                     "|xns": "Roo.form"
403                                 }
404                             ]
405                         },
406                         {
407                             "*prop": "colModel[]",
408                             ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"}",
409                             "dataIndex": "shiphead_order_id_cohead_number",
410                             "header": "Order#",
411                             "sortable": true,
412                             "width": 75,
413                             "xtype": "ColumnModel",
414                             "|renderer": "function(v) { return String.format('{0}', v); }",
415                             "|xns": "Roo.grid"
416                         },
417                         {
418                             "*prop": "colModel[]",
419                             "dataIndex": "shiphead_custinfo_cust_name",
420                             "header": "Customer",
421                             "width": 200,
422                             "xtype": "ColumnModel",
423                             "|renderer": "function(v) { return String.format('{0}', v); }",
424                             "|xns": "Roo.grid"
425                         },
426                         {
427                             "*prop": "colModel[]",
428                             ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"}",
429                             "dataIndex": "shiphead_number",
430                             "header": "Shipment#",
431                             "sortable": true,
432                             "width": 200,
433                             "xtype": "ColumnModel",
434                             "|renderer": "function(v) { return String.format('{0}', v); }",
435                             "|xns": "Roo.grid"
436                         },
437                         {
438                             "xtype": "ColumnModel",
439                             ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}",
440                             "header": "notes",
441                             "width": 200,
442                             "dataIndex": "shiphead_notes",
443                             "|renderer": "function(v) { return String.format('{0}', v); }",
444                             "|xns": "Roo.grid",
445                             "*prop": "colModel[]"
446                         },
447                         {
448                             "*prop": "colModel[]",
449                             "dataIndex": "shiphead_delivery_note",
450                             "header": "Delivery Note#",
451                             "width": 200,
452                             "xtype": "ColumnModel",
453                             "|renderer": "function(v) { return String.format('{0}', v); }",
454                             "|xns": "Roo.grid"
455                         },
456                         {
457                             "*prop": "colModel[]",
458                             ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}",
459                             "dataIndex": "shiphead_shipped",
460                             "header": "shipped",
461                             "width": 75,
462                             "xtype": "ColumnModel",
463                             "|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}",
464                             "|xns": "Roo.grid"
465                         },
466                         {
467                             "*prop": "colModel[]",
468                             ".builderCfg": "{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}",
469                             "dataIndex": "shiphead_shipdate",
470                             "header": "shipdate",
471                             "sortable": true,
472                             "width": 75,
473                             "xtype": "ColumnModel",
474                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
475                             "|xns": "Roo.grid"
476                         }
477                     ]
478                 }
479             ]
480         }
481     ],
482     "permname": "",
483     "modOrder": "100"
484 }