Pman.Dialog.XtupleVendorEdit.bjs
[Pman.Xtuple] / Pman.Dialog.XtupleVendorEdit.bjs
1 {
2     "id": "roo-file-358",
3     "name": "Pman.Dialog.XtupleVendorEdit",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleVendorEdit.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "show": "function (_self)\n{\n    this.layout.getRegion('center').showPanel(0);\n}"
11             },
12             "closable": false,
13             "collapsible": false,
14             "height": 550,
15             "modal": true,
16             "resizable": false,
17             "title": "Edit / Create Vendor",
18             "width": 550,
19             "xtype": "LayoutDialog",
20             "|xns": "Roo",
21             "items": [
22                 {
23                     "*prop": "center",
24                     "tabPosition": "top",
25                     "xtype": "LayoutRegion",
26                     "|xns": "Roo"
27                 },
28                 {
29                     "region": "center",
30                     "title": "Details",
31                     "xtype": "ContentPanel",
32                     "|xns": "Roo",
33                     "items": [
34                         {
35                             "listeners": {
36                                 "|actioncomplete": "function(_self,action)\n{\n    if (action.type == 'setdata') {\n        if(_this.data.vend_id){\n            _this.dialog.el.mask(\"Loading\");\n            this.load({ method: 'GET', params: { '_id' : _this.data.vend_id }});     \n        }\n       \n       return;\n    }\n    if (action.type == 'load') {\n        _this.data = action.result.data;\n        _this.form.findField('addr_view').sync();\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
37                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
38                             },
39                             "method": "POST",
40                             "style": "margin:10px;",
41                             "xtype": "Form",
42                             "|url": "baseURL + '/Roo/vendinfo.php'",
43                             "|xns": "Roo.form",
44                             "items": [
45                                 {
46                                     "legend": "Basic Details",
47                                     "style": "width:450px",
48                                     "xtype": "FieldSet",
49                                     "|xns": "Roo.form",
50                                     "items": [
51                                         {
52                                             "listeners": {
53                                                 "keyup": "function (_self, e)\n{\n    if (!(_this.form.findField('vend_id').getValue() * 1)) {\n    \n        _this.form.findField('vend_number').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());\n    \n    }\n}"
54                                             },
55                                             "allowBlank": false,
56                                             "fieldLabel": "Name",
57                                             "name": "vend_name",
58                                             "width": 200,
59                                             "xtype": "TextField",
60                                             "|xns": "Roo.form"
61                                         },
62                                         {
63                                             "allowBlank": false,
64                                             "fieldLabel": "Vendor #",
65                                             "name": "vend_number",
66                                             "readOnly": true,
67                                             "width": 200,
68                                             "xtype": "TextField",
69                                             "|xns": "Roo.form"
70                                         },
71                                         {
72                                             "allowBlank": true,
73                                             "fieldLabel": "Ship Via",
74                                             "name": "vend_shipvia",
75                                             "width": 200,
76                                             "xtype": "TextField",
77                                             "|xns": "Roo.form"
78                                         },
79                                         {
80                                             "allowBlank": false,
81                                             "alwaysQuery": true,
82                                             "displayField": "curr_symbol",
83                                             "editable": false,
84                                             "emptyText": "Select Currency",
85                                             "fieldLabel": "Currency",
86                                             "forceSelection": true,
87                                             "hiddenName": "vend_curr_id",
88                                             "listWidth": 400,
89                                             "loadingText": "Searching...",
90                                             "minChars": 2,
91                                             "name": "vend_curr_id_curr_symbol",
92                                             "pageSize": 20,
93                                             "qtip": "Select Currency",
94                                             "queryParam": "query[curr_symbol]",
95                                             "selectOnFocus": true,
96                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{curr_symbol}</b> </div>",
97                                             "triggerAction": "all",
98                                             "typeAhead": true,
99                                             "valueField": "curr_id",
100                                             "width": 200,
101                                             "xtype": "ComboBox",
102                                             "|xns": "Roo.form",
103                                             "items": [
104                                                 {
105                                                     "listeners": {
106                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n}\n"
107                                                     },
108                                                     "*prop": "store",
109                                                     "remoteSort": true,
110                                                     "xtype": "Store",
111                                                     "|sortInfo": "{ direction : 'ASC', field: 'curr_symbol' }",
112                                                     "|xns": "Roo.data",
113                                                     "items": [
114                                                         {
115                                                             "*prop": "proxy",
116                                                             "xtype": "HttpProxy",
117                                                             "method": "GET",
118                                                             "|xns": "Roo.data",
119                                                             "|url": "baseURL + '/Roo/curr_symbol.php'"
120                                                         },
121                                                         {
122                                                             "*prop": "reader",
123                                                             "xtype": "JsonReader",
124                                                             "|xns": "Roo.data",
125                                                             "id": "curr_id",
126                                                             "root": "data",
127                                                             "totalProperty": "total",
128                                                             "|fields": "[{\"name\":\"curr_id\",\"type\":\"int\"},\"curr_symbol\"]"
129                                                         }
130                                                     ]
131                                                 }
132                                             ]
133                                         },
134                                         {
135                                             "allowBlank": false,
136                                             "alwaysQuery": true,
137                                             "displayField": "terms_descrip",
138                                             "editable": false,
139                                             "emptyText": "Select Terms",
140                                             "fieldLabel": "Terms",
141                                             "forceSelection": true,
142                                             "hiddenName": "vend_terms_id",
143                                             "listWidth": 400,
144                                             "loadingText": "Searching...",
145                                             "minChars": 2,
146                                             "name": "vend_terms_id_terms_descrip",
147                                             "pageSize": 20,
148                                             "qtip": "Select Terms",
149                                             "queryParam": "query[terms_descrip]",
150                                             "selectOnFocus": true,
151                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{terms_descrip}</b> </div>",
152                                             "triggerAction": "all",
153                                             "typeAhead": true,
154                                             "valueField": "terms_id",
155                                             "width": 200,
156                                             "xtype": "ComboBox",
157                                             "|xns": "Roo.form",
158                                             "items": [
159                                                 {
160                                                     "listeners": {
161                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n}\n"
162                                                     },
163                                                     "*prop": "store",
164                                                     "remoteSort": true,
165                                                     "xtype": "Store",
166                                                     "|sortInfo": "{ direction : 'ASC', field: 'terms_descrip' }",
167                                                     "|xns": "Roo.data",
168                                                     "items": [
169                                                         {
170                                                             "*prop": "proxy",
171                                                             "xtype": "HttpProxy",
172                                                             "method": "GET",
173                                                             "|xns": "Roo.data",
174                                                             "|url": "baseURL + '/Roo/terms.php'"
175                                                         },
176                                                         {
177                                                             "*prop": "reader",
178                                                             "xtype": "JsonReader",
179                                                             "|xns": "Roo.data",
180                                                             "id": "terms_id",
181                                                             "root": "data",
182                                                             "totalProperty": "total",
183                                                             "|fields": "[{\"name\":\"terms_id\",\"type\":\"int\"},\"terms_descrip\"]"
184                                                         }
185                                                     ]
186                                                 }
187                                             ]
188                                         },
189                                         {
190                                             "allowBlank": false,
191                                             "alwaysQuery": true,
192                                             "displayField": "taxzone_descrip",
193                                             "editable": false,
194                                             "emptyText": "Select Taxzone",
195                                             "fieldLabel": "Tax Zone",
196                                             "forceSelection": true,
197                                             "hiddenName": "vend_taxzone_id",
198                                             "listWidth": 400,
199                                             "loadingText": "Searching...",
200                                             "minChars": 2,
201                                             "name": "vend_taxzone_id_taxzone_descrip",
202                                             "pageSize": 20,
203                                             "qtip": "Select Taxzone",
204                                             "queryParam": "query[taxzone_descrip]",
205                                             "selectOnFocus": true,
206                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{taxzone_descrip}</b> </div>",
207                                             "triggerAction": "all",
208                                             "typeAhead": true,
209                                             "valueField": "taxzone_id",
210                                             "width": 200,
211                                             "xtype": "ComboBox",
212                                             "|xns": "Roo.form",
213                                             "items": [
214                                                 {
215                                                     "listeners": {
216                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n}\n"
217                                                     },
218                                                     "*prop": "store",
219                                                     "remoteSort": true,
220                                                     "xtype": "Store",
221                                                     "|sortInfo": "{ direction : 'ASC', field: 'taxzone_descrip' }",
222                                                     "|xns": "Roo.data",
223                                                     "items": [
224                                                         {
225                                                             "*prop": "proxy",
226                                                             "xtype": "HttpProxy",
227                                                             "method": "GET",
228                                                             "|xns": "Roo.data",
229                                                             "|url": "baseURL + '/Roo/taxzone.php'"
230                                                         },
231                                                         {
232                                                             "*prop": "reader",
233                                                             "xtype": "JsonReader",
234                                                             "|xns": "Roo.data",
235                                                             "id": "taxzone_id",
236                                                             "root": "data",
237                                                             "totalProperty": "total",
238                                                             "|fields": "[{\"name\":\"taxzone_id\",\"type\":\"int\"},\"taxzone_descrip\"]"
239                                                         }
240                                                     ]
241                                                 }
242                                             ]
243                                         },
244                                         {
245                                             "listeners": {
246                                                 "add": "function (combo)\n{\n    Pman.Dialog.XtupleVendTypeEdit.show({vendtype_id : 0}, function(res){\n        _this.form.findField('vend_vendtype_id').setFromData(res);\n    \n    });\n}",
247                                                 "edit": "function (combo, record)\n{\n    var s = _this.form.findField('vend_vendtype_id').getValue() * 1;\n    if(s < 1){\n        Roo.MessageBox.alert('Error','Please select a type');\n        return;\n    }\n\n    Pman.Dialog.XtupleVendTypeEdit.show({vendtype_id : s}, function(res){\n\n        _this.form.findField('vend_vendtype_id').setFromData(res);\n    \n    });\n}"
248                                             },
249                                             "allowBlank": false,
250                                             "alwaysQuery": true,
251                                             "displayField": "vendtype_descrip",
252                                             "editable": false,
253                                             "emptyText": "Select Vendor Type",
254                                             "fieldLabel": "Type",
255                                             "forceSelection": true,
256                                             "hiddenName": "vend_vendtype_id",
257                                             "listWidth": 400,
258                                             "loadingText": "Searching...",
259                                             "minChars": 2,
260                                             "name": "vend_vendtype_id_vendtype_descrip",
261                                             "pageSize": 20,
262                                             "qtip": "Select Vendor Type",
263                                             "queryParam": "query[vendtype_descrip]",
264                                             "selectOnFocus": true,
265                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{vendtype_descrip}</b> </div>",
266                                             "triggerAction": "all",
267                                             "typeAhead": true,
268                                             "valueField": "vendtype_id",
269                                             "width": 200,
270                                             "xtype": "ComboBox",
271                                             "|xns": "Roo.form",
272                                             "items": [
273                                                 {
274                                                     "listeners": {
275                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n}\n"
276                                                     },
277                                                     "*prop": "store",
278                                                     "remoteSort": true,
279                                                     "xtype": "Store",
280                                                     "|sortInfo": "{ direction : 'ASC', field: 'vendtype_descrip' }",
281                                                     "|xns": "Roo.data",
282                                                     "items": [
283                                                         {
284                                                             "*prop": "proxy",
285                                                             "method": "GET",
286                                                             "xtype": "HttpProxy",
287                                                             "|url": "baseURL + '/Roo/vendtype.php'",
288                                                             "|xns": "Roo.data"
289                                                         },
290                                                         {
291                                                             "*prop": "reader",
292                                                             "id": "vendtype_id",
293                                                             "root": "data",
294                                                             "totalProperty": "total",
295                                                             "xtype": "JsonReader",
296                                                             "|fields": "[{\"name\":\"vendtype_id\",\"type\":\"int\"},\"vendtype_descrip\"]",
297                                                             "|xns": "Roo.data"
298                                                         }
299                                                     ]
300                                                 }
301                                             ]
302                                         },
303                                         {
304                                             "fieldLabel": "Active",
305                                             "inputValue": "true",
306                                             "name": "vend_active",
307                                             "valueOff": 0,
308                                             "xtype": "Checkbox",
309                                             "|xns": "Roo.form"
310                                         },
311                                         {
312                                             "allowBlank": true,
313                                             "fieldLabel": "Comments",
314                                             "name": "vend_comments",
315                                             "xtype": "TextArea",
316                                             "|xns": "Roo.form"
317                                         }
318                                     ]
319                                 },
320                                 {
321                                     "hideLabels": true,
322                                     "legend": "Address",
323                                     "style": "width:450px;",
324                                     "xtype": "FieldSet",
325                                     "|xns": "Roo.form",
326                                     "items": [
327                                         {
328                                             "listeners": {
329                                                 "add": "function (combo)\n{\n    Pman.Dialog.XtupleAddress.show({addr_id : 0});\n}",
330                                                 "edit": "function (combo, record)\n{\n    var s = _this.form.findField('vend_addr_id').getValue() * 1;\n    if(s < 1){\n        Roo.MessageBox.alert('Error','Please select a address');\n        return;\n    }\n    Pman.Dialog.XtupleAddress.show({addr_id : s});\n}",
331                                                 "select": "function (combo, record, index)\n{\n    for(var i in record.data) {\n        _this.data['vend_addr_id_' + i] = record.data[i];\n    }\n\n    _this.form.findField('addr_view').sync();\n}"
332                                             },
333                                             "allowBlank": false,
334                                             "alwaysQuery": true,
335                                             "displayField": "addr_number",
336                                             "editable": true,
337                                             "emptyText": "Select Address",
338                                             "fieldLabel": "Address",
339                                             "forceSelection": true,
340                                             "hiddenName": "vend_addr_id",
341                                             "listWidth": 400,
342                                             "loadingText": "Searching...",
343                                             "minChars": 2,
344                                             "name": "vend_addr_id_addr_number",
345                                             "pageSize": 20,
346                                             "qtip": "Select Address",
347                                             "queryParam": "query[address]",
348                                             "selectOnFocus": true,
349                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>#{addr_id} - {addr_number}</b> </div>",
350                                             "triggerAction": "all",
351                                             "typeAhead": true,
352                                             "valueField": "addr_id",
353                                             "width": 400,
354                                             "xtype": "ComboBox",
355                                             "|xns": "Roo.form",
356                                             "items": [
357                                                 {
358                                                     "listeners": {
359                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    addr_active = 1;\n}\n"
360                                                     },
361                                                     "*prop": "store",
362                                                     "remoteSort": true,
363                                                     "xtype": "Store",
364                                                     "|sortInfo": "{ direction : 'DESC', field: 'addr_id' }",
365                                                     "|xns": "Roo.data",
366                                                     "items": [
367                                                         {
368                                                             "*prop": "proxy",
369                                                             "method": "GET",
370                                                             "xtype": "HttpProxy",
371                                                             "|url": "baseURL + '/Roo/addr.php'",
372                                                             "|xns": "Roo.data"
373                                                         },
374                                                         {
375                                                             "*prop": "reader",
376                                                             "id": "addr_id",
377                                                             "root": "data",
378                                                             "totalProperty": "total",
379                                                             "xtype": "JsonReader",
380                                                             "|fields": "[{\"name\":\"addr_id\",\"type\":\"int\"},\"addr_number\"]",
381                                                             "|xns": "Roo.data"
382                                                         }
383                                                     ]
384                                                 }
385                                             ]
386                                         },
387                                         {
388                                             "allowBlank": true,
389                                             "fieldLabel": "Notes",
390                                             "name": "addr_view",
391                                             "readOnly": true,
392                                             "width": 400,
393                                             "xtype": "TextArea",
394                                             "|sync": "function() {\n    var a = [ 'line1', 'line2', 'line3', 'city', 'state', 'country' ];\n    var v = [];\n    \n    Roo.each(a, function(e) {\n        if (_this.data['vend_addr_id_addr_' +e].length) {\n            v.push(_this.data['vend_addr_id_addr_' +e]);\n        }\n    });\n    \n    this.setValue(v.join(\"\\n\"));\n}\n",
395                                             "|xns": "Roo.form"
396                                         }
397                                     ]
398                                 },
399                                 {
400                                     "name": "vend_id",
401                                     "xtype": "Hidden",
402                                     "|xns": "Roo.form"
403                                 }
404                             ]
405                         }
406                     ]
407                 },
408                 {
409                     "listeners": {
410                         "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
411                     },
412                     "background": true,
413                     "fitContainer": true,
414                     "fitToframe": true,
415                     "region": "center",
416                     "tableName": "itemsrc",
417                     "title": "Supplier of",
418                     "xtype": "GridPanel",
419                     "|xns": "Roo",
420                     "items": [
421                         {
422                             "listeners": {
423                                 "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
424                                 "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
425                             },
426                             "*prop": "grid",
427                             "autoExpandColumn": "itemsrc_vend_item_descrip",
428                             "loadMask": true,
429                             "xtype": "Grid",
430                             "|xns": "Roo.grid",
431                             "items": [
432                                 {
433                                     "listeners": {
434                                         "beforeload": "function (_self, options)\n{\n    options.params.itemsrc_vend_id =   _this.form.findField('vend_id').getValue();\n}"
435                                     },
436                                     "*prop": "dataSource",
437                                     "remoteSort": true,
438                                     "xtype": "Store",
439                                     "|sortInfo": "{ field : 'itemsrc_id_item_number', direction: 'ASC' }",
440                                     "|xns": "Roo.data",
441                                     "items": [
442                                         {
443                                             "*prop": "proxy",
444                                             "xtype": "HttpProxy",
445                                             "method": "GET",
446                                             "|url": "baseURL + '/Roo/itemsrc.php'",
447                                             "|xns": "Roo.data"
448                                         },
449                                         {
450                                             "|xns": "Roo.data",
451                                             "xtype": "JsonReader",
452                                             "totalProperty": "total",
453                                             "root": "data",
454                                             "*prop": "reader",
455                                             "id": "id",
456                                             "|fields": "[\n    {\n        'name': 'itemsrc_id',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_item_id',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_item_id',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_vend_id',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_vend_id',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_vend_item_number',\n        'type': 'string'\n    },\n    {\n        'name': 'itemsrc_vend_item_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'itemsrc_comments',\n        'type': 'string'\n    },\n    {\n        'name': 'itemsrc_vend_uom',\n        'type': 'string'\n    },\n    {\n        'name': 'itemsrc_invvendoruomratio',\n        'type': 'float'\n    },\n    {\n        'name': 'itemsrc_minordqty',\n        'type': 'float'\n    },\n    {\n        'name': 'itemsrc_multordqty',\n        'type': 'float'\n    },\n    {\n        'name': 'itemsrc_leadtime',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_ranking',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_active',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_manuf_name',\n        'type': 'string'\n    },\n    {\n        'name': 'itemsrc_manuf_item_number',\n        'type': 'string'\n    },\n    {\n        'name': 'itemsrc_manuf_item_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'itemsrc_default',\n        'type': 'int'\n    },\n    {\n        'name': 'itemsrc_upccode',\n        'type': 'string'\n    }\n]"
457                                         }
458                                     ]
459                                 },
460                                 {
461                                     "*prop": "footer",
462                                     "xtype": "PagingToolbar",
463                                     "pageSize": 25,
464                                     "displayInfo": true,
465                                     "displayMsg": "Displaying itemsrc{0} - {1} of {2}",
466                                     "emptyMsg": "No itemsrc found",
467                                     "|xns": "Roo"
468                                 },
469                                 {
470                                     "*prop": "toolbar",
471                                     "xtype": "Toolbar",
472                                     "|xns": "Roo",
473                                     "items": [
474                                         {
475                                             "text": "Add",
476                                             "xtype": "Button",
477                                             "cls": "x-btn-text-icon",
478                                             "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
479                                             "listeners": {
480                                                 "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
481                                             },
482                                             "|xns": "Roo.Toolbar"
483                                         },
484                                         {
485                                             "|xns": "Roo.Toolbar",
486                                             "xtype": "Fill"
487                                         },
488                                         {
489                                             "text": "Delete",
490                                             "cls": "x-btn-text-icon",
491                                             "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
492                                             "xtype": "Button",
493                                             "listeners": {
494                                                 "|click": "function()\n{\n     Pman.genericDelete(_this, 'itemsrc'); \n}\n        "
495                                             },
496                                             "|xns": "Roo.Toolbar"
497                                         }
498                                     ]
499                                 },
500                                 {
501                                     "*prop": "colModel[]",
502                                     "dataIndex": "itemsrc_item_id_item_number",
503                                     "header": "Item",
504                                     "width": 120,
505                                     "xtype": "ColumnModel",
506                                     "|renderer": "function(v) { return String.format('{0}', v); }",
507                                     "|xns": "Roo.grid"
508                                 },
509                                 {
510                                     "*prop": "colModel[]",
511                                     "dataIndex": "itemsrc_vend_item_number",
512                                     "header": "Vendor item number",
513                                     "width": 120,
514                                     "xtype": "ColumnModel",
515                                     "|renderer": "function(v) { return String.format('{0}', v); }",
516                                     "|xns": "Roo.grid"
517                                 },
518                                 {
519                                     "*prop": "colModel[]",
520                                     "dataIndex": "itemsrc_vend_item_descrip",
521                                     "header": "Vendor item description",
522                                     "width": 200,
523                                     "xtype": "ColumnModel",
524                                     "|renderer": "function(v) { return String.format('{0}', v); }",
525                                     "|xns": "Roo.grid"
526                                 },
527                                 {
528                                     "*prop": "colModel[]",
529                                     "dataIndex": "itemsrc_vend_uom",
530                                     "header": "Uom",
531                                     "width": 50,
532                                     "xtype": "ColumnModel",
533                                     "|renderer": "function(v) { return String.format('{0}', v); }",
534                                     "|xns": "Roo.grid"
535                                 },
536                                 {
537                                     "*prop": "colModel[]",
538                                     "dataIndex": "itemsrc_minordqty",
539                                     "header": "Min ord qty",
540                                     "width": 50,
541                                     "xtype": "ColumnModel",
542                                     "|renderer": "function(v) { return String.format('{0}', v); }",
543                                     "|xns": "Roo.grid"
544                                 },
545                                 {
546                                     "*prop": "colModel[]",
547                                     "dataIndex": "itemsrc_leadtime",
548                                     "header": "Lead time",
549                                     "width": 75,
550                                     "xtype": "ColumnModel",
551                                     "|renderer": "function(v) { return String.format('{0}', v); }",
552                                     "|xns": "Roo.grid"
553                                 },
554                                 {
555                                     "*prop": "colModel[]",
556                                     "dataIndex": "itemsrc_active",
557                                     "header": "Active",
558                                     "width": 75,
559                                     "xtype": "ColumnModel",
560                                     "|renderer": "function(v) { return String.format('{0}', v); }",
561                                     "|xns": "Roo.grid"
562                                 }
563                             ]
564                         }
565                     ]
566                 },
567                 {
568                     "listeners": {
569                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
570                     },
571                     "*prop": "buttons[]",
572                     "text": "Cancel",
573                     "xtype": "Button",
574                     "|xns": "Roo"
575                 },
576                 {
577                     "listeners": {
578                         "click": "function (_self, e)\n{\n    _this.form.doAction(\"submit\");\n\n}"
579                     },
580                     "*prop": "buttons[]",
581                     "text": "Save",
582                     "xtype": "Button",
583                     "|xns": "Roo"
584                 }
585             ]
586         }
587     ],
588     "permname": "",
589     "modOrder": "001"
590 }