Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleInvc.bjs
1 {
2     "id": "roo-file-9",
3     "name": "Pman.Dialog.XtupleInvc",
4     "parent": "",
5     "title": "",
6     "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleInvc.bjs",
7     "items": [
8         {
9             "closable": true,
10             "collapsible": false,
11             "height": 600,
12             "modal": true,
13             "resizable": false,
14             "title": "View Invoice",
15             "width": 1000,
16             "xtype": "LayoutDialog",
17             "|xns": "Roo",
18             "items": [
19                 {
20                     "|xns": "Roo",
21                     "xtype": "LayoutRegion",
22                     "*prop": "center"
23                 },
24                 {
25                     "*prop": "north",
26                     "height": 250,
27                     "split": true,
28                     "xtype": "LayoutRegion",
29                     "|xns": "Roo"
30                 },
31                 {
32                     "region": "north",
33                     "xtype": "ContentPanel",
34                     "|xns": "Roo",
35                     "items": [
36                         {
37                             "listeners": {
38                                 "|actioncomplete": "function(_self,action)\n{\n   if (action.type == 'setdata') {\n        if (_this.data._id) {\n            this.load({ method: 'GET', params: { '_id' : _this.data._id }});\n           return;\n       }      \n       \n       \n       \n       _this.saveBtn.hide();\n            \n       \n       \n       \n    }\n    if (action.type == 'load') {\n        var d = action.result.data;\n        \n\n         _this.grid.ds.load({});\n        return;\n    }\n    if (action.type =='submit') {\n                \n        _this.dialog.hide();\n        return;    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
39                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
40                             },
41                             "method": "POST",
42                             "style": "margin:10px;",
43                             "xtype": "Form",
44                             "|url": "baseURL + '/Roo/invchead.php'",
45                             "|xns": "Roo.form",
46                             "items": [
47                                 {
48                                     "width": 950,
49                                     "xtype": "Row",
50                                     "|xns": "Roo.form",
51                                     "items": [
52                                         {
53                                             "style": "float:left;",
54                                             "width": 300,
55                                             "xtype": "Column",
56                                             "|xns": "Roo.form",
57                                             "items": [
58                                                 {
59                                                     "labelWidth": 70,
60                                                     "legend": "Invoice Details",
61                                                     "style": "width:280px",
62                                                     "xtype": "FieldSet",
63                                                     "|xns": "Roo.form",
64                                                     "items": [
65                                                         {
66                                                             "fieldLabel": "Invoiced",
67                                                             "format": "Y-m-d",
68                                                             "name": "invchead_invcdate",
69                                                             "width": 120,
70                                                             "xtype": "DateField",
71                                                             "|xns": "Roo.form"
72                                                         },
73                                                         {
74                                                             "fieldLabel": "Ordered",
75                                                             "format": "Y-m-d",
76                                                             "name": "invchead_orderdate",
77                                                             "width": 120,
78                                                             "xtype": "DateField",
79                                                             "|xns": "Roo.form"
80                                                         },
81                                                         {
82                                                             "fieldLabel": "Invoice#",
83                                                             "name": "invchead_invcnumber",
84                                                             "width": 120,
85                                                             "xtype": "TextField",
86                                                             "|xns": "Roo.form"
87                                                         },
88                                                         {
89                                                             "fieldLabel": "PO#",
90                                                             "name": "invchead_ponumber",
91                                                             "width": 120,
92                                                             "xtype": "TextField",
93                                                             "|xns": "Roo.form"
94                                                         },
95                                                         {
96                                                             "fieldLabel": "Customer",
97                                                             "name": "cust_name",
98                                                             "width": 200,
99                                                             "xtype": "TextField",
100                                                             "|xns": "Roo.form"
101                                                         },
102                                                         {
103                                                             "fieldLabel": "FOB",
104                                                             "name": "invchead_fob",
105                                                             "width": 200,
106                                                             "xtype": "TextField",
107                                                             "|xns": "Roo.form"
108                                                         },
109                                                         {
110                                                             "fieldLabel": "Shipvia",
111                                                             "name": "invchead_shipvia",
112                                                             "width": 200,
113                                                             "xtype": "TextField",
114                                                             "|xns": "Roo.form"
115                                                         },
116                                                         {
117                                                             "fieldLabel": "salesrep",
118                                                             "name": "invchead_salesrep_id",
119                                                             "width": 75,
120                                                             "xtype": "TextField",
121                                                             "|xns": "Roo.form"
122                                                         },
123                                                         {
124                                                             "fieldLabel": "Terms",
125                                                             "name": "invchead_terms_id",
126                                                             "width": 75,
127                                                             "xtype": "TextField",
128                                                             "|xns": "Roo.form"
129                                                         }
130                                                     ]
131                                                 }
132                                             ]
133                                         },
134                                         {
135                                             "style": "margin-left:10px;float:left;",
136                                             "width": 370,
137                                             "xtype": "Column",
138                                             "|xns": "Roo.form",
139                                             "items": [
140                                                 {
141                                                     "labelAlign": "left",
142                                                     "labelWidth": 100,
143                                                     "legend": "Charges",
144                                                     "style": "width:350px",
145                                                     "xtype": "FieldSet",
146                                                     "|xns": "Roo.form",
147                                                     "items": [
148                                                         {
149                                                             "allowBlank": false,
150                                                             "displayField": "invc_curr_id",
151                                                             "editable": false,
152                                                             "emptyText": "Select curr_symbol",
153                                                             "fieldLabel": "Currency",
154                                                             "forceSelection": true,
155                                                             "hiddenName": "invchead_curr_id",
156                                                             "listWidth": 400,
157                                                             "loadingText": "Searching...",
158                                                             "minChars": 2,
159                                                             "name": "invchead_curr_id_curr_name",
160                                                             "pageSize": 20,
161                                                             "qtip": "Select curr_symbol",
162                                                             "queryParam": "query[curr_name]",
163                                                             "selectOnFocus": true,
164                                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>",
165                                                             "triggerAction": "all",
166                                                             "typeAhead": true,
167                                                             "valueField": "id",
168                                                             "width": 220,
169                                                             "xtype": "ComboBox",
170                                                             "|xns": "Roo.form",
171                                                             "items": [
172                                                                 {
173                                                                     "*prop": "store",
174                                                                     "xtype": "Store",
175                                                                     "|xns": "Roo.data",
176                                                                     "remoteSort": true,
177                                                                     "|sortInfo": "{ direction : 'ASC', field: 'id' }",
178                                                                     "listeners": {
179                                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
180                                                                     },
181                                                                     "items": [
182                                                                         {
183                                                                             "*prop": "proxy",
184                                                                             "xtype": "HttpProxy",
185                                                                             "method": "GET",
186                                                                             "|xns": "Roo.data",
187                                                                             "|url": "baseURL + '/Roo/curr_symbol.php'"
188                                                                         },
189                                                                         {
190                                                                             "*prop": "reader",
191                                                                             "xtype": "JsonReader",
192                                                                             "|xns": "Roo.data",
193                                                                             "id": "id",
194                                                                             "root": "data",
195                                                                             "totalProperty": "total",
196                                                                             "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"curr_name\",\"type\":\"string\"}]"
197                                                                         }
198                                                                     ]
199                                                                 }
200                                                             ]
201                                                         },
202                                                         {
203                                                             "labelAlign": "right",
204                                                             "labelWidth": 250,
205                                                             "xtype": "Row",
206                                                             "|xns": "Roo.form",
207                                                             "items": [
208                                                                 {
209                                                                     "style": "align:right;",
210                                                                     "fieldLabel": "Items Total",
211                                                                     "name": "invchead_invctotal",
212                                                                     "width": 75,
213                                                                     "xtype": "TextField",
214                                                                     "|xns": "Roo.form"
215                                                                 }
216                                                             ]
217                                                         },
218                                                         {
219                                                             "labelAlign": "right",
220                                                             "labelWidth": 250,
221                                                             "xtype": "Row",
222                                                             "|xns": "Roo.form",
223                                                             "items": [
224                                                                 {
225                                                                     "style": "align:right;",
226                                                                     "fieldLabel": "Freight",
227                                                                     "name": "invchead_freight",
228                                                                     "width": 75,
229                                                                     "xtype": "TextField",
230                                                                     "|xns": "Roo.form"
231                                                                 }
232                                                             ]
233                                                         },
234                                                         {
235                                                             "labelAlign": "top",
236                                                             "labelSeparator": "&nbsp;",
237                                                             "width": 430,
238                                                             "xtype": "Row",
239                                                             "|xns": "Roo.form",
240                                                             "items": [
241                                                                 {
242                                                                     "fieldLabel": "Discount Description",
243                                                                     "name": "invchead_misc_descrip",
244                                                                     "width": 235,
245                                                                     "xtype": "TextField",
246                                                                     "|xns": "Roo.form"
247                                                                 },
248                                                                 {
249                                                                     "style": "align:right;",
250                                                                     "fieldLabel": "&nbsp;",
251                                                                     "name": "invchead_misc_amount",
252                                                                     "width": 75,
253                                                                     "xtype": "NumberField",
254                                                                     "|xns": "Roo.form"
255                                                                 }
256                                                             ]
257                                                         },
258                                                         {
259                                                             "labelAlign": "right",
260                                                             "labelWidth": 250,
261                                                             "xtype": "Row",
262                                                             "|xns": "Roo.form",
263                                                             "items": [
264                                                                 {
265                                                                     "style": "align:right;",
266                                                                     "fieldLabel": "Total",
267                                                                     "name": "invchead_total",
268                                                                     "width": 75,
269                                                                     "xtype": "TextField",
270                                                                     "|xns": "Roo.form"
271                                                                 }
272                                                             ]
273                                                         },
274                                                         {
275                                                             "labelAlign": "top",
276                                                             "width": 430,
277                                                             "xtype": "Row",
278                                                             "|xns": "Roo.form",
279                                                             "items": [
280                                                                 {
281                                                                     "fieldLabel": "Payment Ref",
282                                                                     "name": "invchead_paymentref",
283                                                                     "width": 235,
284                                                                     "xtype": "TextField",
285                                                                     "|xns": "Roo.form"
286                                                                 },
287                                                                 {
288                                                                     "style": "align:right;",
289                                                                     "fieldLabel": "Paid",
290                                                                     "name": "invchead_payment",
291                                                                     "width": 75,
292                                                                     "xtype": "NumberField",
293                                                                     "|xns": "Roo.form"
294                                                                 }
295                                                             ]
296                                                         }
297                                                     ]
298                                                 }
299                                             ]
300                                         },
301                                         {
302                                             "labelAlign": "top",
303                                             "style": "margin-left:10px;float:left;",
304                                             "width": 250,
305                                             "xtype": "Column",
306                                             "|xns": "Roo.form",
307                                             "items": [
308                                                 {
309                                                     "fieldLabel": "Invchead notes",
310                                                     "height": 60,
311                                                     "name": "invchead_notes",
312                                                     "width": 250,
313                                                     "xtype": "TextArea",
314                                                     "|xns": "Roo.form"
315                                                 },
316                                                 {
317                                                     "fieldLabel": "BillTo",
318                                                     "height": 60,
319                                                     "name": "invchead_billto",
320                                                     "width": 250,
321                                                     "xtype": "TextArea",
322                                                     "|xns": "Roo.form"
323                                                 },
324                                                 {
325                                                     "fieldLabel": "Shipto",
326                                                     "height": 60,
327                                                     "name": "invchead_shipto",
328                                                     "width": 250,
329                                                     "xtype": "TextArea",
330                                                     "|xns": "Roo.form"
331                                                 }
332                                             ]
333                                         }
334                                     ]
335                                 },
336                                 {
337                                     "name": "invchead_id",
338                                     "xtype": "Hidden",
339                                     "|xns": "Roo.form"
340                                 },
341                                 {
342                                     "name": "invchead_void",
343                                     "xtype": "Hidden",
344                                     "|xns": "Roo.form"
345                                 },
346                                 {
347                                     "name": "billitems",
348                                     "xtype": "Hidden",
349                                     "|xns": "Roo.form"
350                                 }
351                             ]
352                         }
353                     ]
354                 },
355                 {
356                     "listeners": {
357                         "|activate": "function() {\n    _this.panel = this;\n     \n}"
358                     },
359                     "background": false,
360                     "fitContainer": true,
361                     "fitToframe": true,
362                     "region": "center",
363                     "tableName": "invcitem",
364                     "title": "invcitem",
365                     "xtype": "GridPanel",
366                     "|xns": "Roo",
367                     "items": [
368                         {
369                             "listeners": {
370                                 "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    \n}",
371                                 "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
372                             },
373                             "*prop": "grid",
374                             "autoExpandColumn": "invcitem_item_id_item_descrip1",
375                             "loadMask": true,
376                             "xtype": "Grid",
377                             "|xns": "Roo.grid",
378                             "items": [
379                                 {
380                                     "listeners": {
381                                         "beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n        var id  = _this.form.findField('invchead_id').getValue();\n        if (!id){\n            return false;\n        }\n        o.params.invcitem_invchead_id = id;\n        o.params.limit = 999;\n}"
382                                     },
383                                     "*prop": "dataSource",
384                                     "remoteSort": true,
385                                     "xtype": "Store",
386                                     "|sortInfo": "{ field : 'invcitem_linenumber', direction: 'ASC' }",
387                                     "|xns": "Roo.data",
388                                     "items": [
389                                         {
390                                             "*prop": "proxy",
391                                             "xtype": "HttpProxy",
392                                             "method": "GET",
393                                             "|url": "baseURL + '/Roo/invcitem.php'",
394                                             "|xns": "Roo.data"
395                                         },
396                                         {
397                                             "|xns": "Roo.data",
398                                             "xtype": "JsonReader",
399                                             "totalProperty": "total",
400                                             "root": "data",
401                                             "*prop": "reader",
402                                             "id": "id",
403                                             "|fields": "[\n    {\n        'name': 'invcitem_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_linenumber',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_item_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_warehous_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_custpn',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_number',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_ordered',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_billed',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_custprice',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_price',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_notes',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_salescat_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_taxtype_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_qty_uom_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_qty_invuomratio',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_price_uom_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_price_invuomratio',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_coitem_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_updateinv',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_taxtype_id_taxtype_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_taxtype_id_taxtype_name',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_taxtype_id_taxtype_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_taxtype_id_taxtype_sys',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_qty_uom_id_uom_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_qty_uom_id_uom_name',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_qty_uom_id_uom_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_qty_uom_id_uom_item_weight',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_price_uom_id_uom_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_price_uom_id_uom_name',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_price_uom_id_uom_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_price_uom_id_uom_item_weight',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_cust_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_ordernumber',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_orderdate',\n        'type': 'date'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_posted',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_printed',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_invcnumber',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_invcdate',\n        'type': 'date'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipdate',\n        'type': 'date'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_ponumber',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipvia',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_fob',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_name',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_address1',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_address2',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_address3',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_city',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_state',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_zipcode',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_name',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_address1',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_address2',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_address3',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_city',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_state',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_zipcode',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_salesrep_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_commission',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_terms_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_freight',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_misc_amount',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_misc_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_misc_accnt_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_payment',\n        'type': 'float'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_paymentref',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_notes',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_billto_country',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipto_country',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_prj_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_curr_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_gldistdate',\n        'type': 'date'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_recurring',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_recurring_interval',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_recurring_type',\n        'type': 'string'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_recurring_until',\n        'type': 'date'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_recurring_invchead_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_shipchrg_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_taxzone_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invcitem_invchead_id_invchead_void',\n        'type': 'int'\n    }\n]"
404                                         }
405                                     ]
406                                 },
407                                 {
408                                     "*prop": "colModel[]",
409                                     "dataIndex": "invcitem_linenumber",
410                                     "header": "Line",
411                                     "width": 75,
412                                     "xtype": "ColumnModel",
413                                     "|renderer": "function(v) { return String.format('{0}', v); }",
414                                     "|xns": "Roo.grid"
415                                 },
416                                 {
417                                     "*prop": "colModel[]",
418                                     "dataIndex": "invcitem_item_id_item_number",
419                                     "header": "SKU#",
420                                     "width": 75,
421                                     "xtype": "ColumnModel",
422                                     "|renderer": "function(v) { return String.format('{0}', v); }",
423                                     "|xns": "Roo.grid"
424                                 },
425                                 {
426                                     "*prop": "colModel[]",
427                                     "dataIndex": "invcitem_item_id_item_descrip1",
428                                     "header": "Description",
429                                     "width": 200,
430                                     "xtype": "ColumnModel",
431                                     "|renderer": "function(v) { return String.format('{0}', v); }",
432                                     "|xns": "Roo.grid"
433                                 },
434                                 {
435                                     "*prop": "colModel[]",
436                                     "align": "right",
437                                     "dataIndex": "invcitem_price",
438                                     "header": "Price",
439                                     "width": 75,
440                                     "xtype": "ColumnModel",
441                                     "|renderer": "function(v) { return String.format('{0}', v); }",
442                                     "|xns": "Roo.grid"
443                                 },
444                                 {
445                                     "*prop": "colModel[]",
446                                     "align": "right",
447                                     "dataIndex": "invcitem_ordered",
448                                     "header": "Qty",
449                                     "width": 75,
450                                     "xtype": "ColumnModel",
451                                     "|renderer": "function(v) { return String.format('{0}', v); }",
452                                     "|xns": "Roo.grid"
453                                 }
454                             ]
455                         }
456                     ]
457                 },
458                 {
459                     "listeners": {
460                         "click": "function (_self, e)\n{\n    var invchead_id = _this.form.findField('invchead_id').getValue();\n    if(invchead_id * 1 < 1){\n        Roo.MessageBox.alert(\"Error\", \"Error occur on getting the invchead_id\");\n        return;\n    }\n    new Pman.Download({\n        url : baseURL + '/Roo/invchead',\n        method : 'GET',\n        params : {\n            invchead_id : invchead_id,\n            _print : 1\n        },\n        success : function() {\n\n        }\n    })\n}"
461                     },
462                     "cls": "x-btn-text-icon",
463                     "*prop": "buttons[]",
464                     "text": "Print Invoice",
465                     "xtype": "Button",
466                     "|icon": "rootURL + '/Pman/templates/images/pdf.gif'",
467                     "|xns": "Roo"
468                 },
469                 {
470                     "listeners": {
471                         "click": "function (_self, e)\n{\n    new Pman.Download({\n        grid : _this.grid\n    });\n}"
472                     },
473                     "*prop": "buttons[]",
474                     "text": "Download items",
475                     "xtype": "Button",
476                     "|xns": "Roo"
477                 },
478                 {
479                     "listeners": {
480                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
481                     },
482                     "*prop": "buttons[]",
483                     "text": "Cancel",
484                     "xtype": "Button",
485                     "|xns": "Roo"
486                 }
487             ]
488         }
489     ],
490     "permname": "",
491     "modOrder": "001"
492 }