Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtuplePurchaseOrderNew.bjs
1 {
2     "id": "roo-file-23",
3     "name": "Pman.Dialog.XtuplePurchaseOrderNew",
4     "parent": "",
5     "title": "",
6     "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtuplePurchaseOrderNew.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "show": "function (_self)\n{\n    _this.form.findField('pohead_vend_id').focus();\n}"
11             },
12             "closable": false,
13             "height": 180,
14             "modal": true,
15             "resizable": false,
16             "title": "Pick Vendor",
17             "width": 500,
18             "xtype": "LayoutDialog",
19             "|xns": "Roo",
20             "items": [
21                 {
22                     "|xns": "Roo",
23                     "xtype": "LayoutRegion",
24                     "*prop": "center"
25                 },
26                 {
27                     "region": "center",
28                     "xtype": "ContentPanel",
29                     "|xns": "Roo",
30                     "items": [
31                         {
32                             "listeners": {
33                                 "rendered": "function (form)\n{\n  _this.form = form;\n}"
34                             },
35                             "xtype": "Form",
36                             "|xns": "Roo.form",
37                             "items": [
38                                 {
39                                     "listeners": {
40                                         "select": "function (combo, record, index)\n{\n   \n   Roo.log(record);\n    _this.form.setValues({\n        pohead_curr_id : record.data.vend_curr_id,\n        pohead_curr_id_curr_name : record.data.vend_curr_id_curr_name\n    \n    });\n}",
41                                         "render": "function (_self)\n{\n    _this.vendor = _self;\n}"
42                                     },
43                                     "allowBlank": false,
44                                     "displayField": "vend_name",
45                                     "editable": true,
46                                     "fieldLabel": "Select Vendor",
47                                     "forceSelection": true,
48                                     "hiddenName": "pohead_vend_id",
49                                     "listWidth": 400,
50                                     "loadingText": "Searching...",
51                                     "minChars": 2,
52                                     "name": "pohead_vend_id_vend_name",
53                                     "pageSize": 20,
54                                     "qtip": "Select a vendor",
55                                     "queryParam": "query[vend_name]",
56                                     "selectOnFocus": true,
57                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{vend_name}</b></div>",
58                                     "triggerAction": "all",
59                                     "typeAhead": true,
60                                     "valueField": "vend_id",
61                                     "width": 300,
62                                     "xtype": "ComboBox",
63                                     "|xns": "Roo.form",
64                                     "items": [
65                                         {
66                                             "listeners": {
67                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n}\n"
68                                             },
69                                             "*prop": "store",
70                                             "remoteSort": true,
71                                             "xtype": "Store",
72                                             "|sortInfo": "{ direction : 'ASC', field: 'vend_name' }",
73                                             "|xns": "Roo.data",
74                                             "items": [
75                                                 {
76                                                     "*prop": "proxy",
77                                                     "method": "GET",
78                                                     "xtype": "HttpProxy",
79                                                     "|url": "baseURL + '/Roo/Vendinfo.php'",
80                                                     "|xns": "Roo.data"
81                                                 },
82                                                 {
83                                                     "*prop": "reader",
84                                                     "id": "vend_id",
85                                                     "root": "data",
86                                                     "totalProperty": "total",
87                                                     "xtype": "JsonReader",
88                                                     "|fields": "[\n    {\"name\":\"vend_id\",\"type\":\"int\"},\n    {\"name\":\"vend_name\",\"type\":\"string\"}\n]",
89                                                     "|xns": "Roo.data"
90                                                 }
91                                             ]
92                                         }
93                                     ]
94                                 },
95                                 {
96                                     "allowBlank": false,
97                                     "displayField": "curr_name",
98                                     "editable": false,
99                                     "emptyText": "Select Currency",
100                                     "fieldLabel": "Currency",
101                                     "forceSelection": true,
102                                     "hiddenName": "pohead_curr_id",
103                                     "listWidth": 400,
104                                     "loadingText": "Searching...",
105                                     "minChars": 2,
106                                     "name": "pohead_curr_id_curr_name",
107                                     "pageSize": 20,
108                                     "qtip": "Select Currency",
109                                     "queryParam": "query[curr_name]",
110                                     "selectOnFocus": true,
111                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>",
112                                     "triggerAction": "all",
113                                     "typeAhead": true,
114                                     "valueField": "curr_id",
115                                     "width": 300,
116                                     "xtype": "ComboBox",
117                                     "|xns": "Roo.form",
118                                     "items": [
119                                         {
120                                             "listeners": {
121                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n}\n"
122                                             },
123                                             "*prop": "store",
124                                             "remoteSort": true,
125                                             "xtype": "Store",
126                                             "|sortInfo": "{ direction : 'ASC', field: 'curr_id' }",
127                                             "|xns": "Roo.data",
128                                             "items": [
129                                                 {
130                                                     "*prop": "proxy",
131                                                     "xtype": "HttpProxy",
132                                                     "method": "GET",
133                                                     "|xns": "Roo.data",
134                                                     "|url": "baseURL + '/Roo/curr_symbol.php'"
135                                                 },
136                                                 {
137                                                     "*prop": "reader",
138                                                     "id": "curr_id",
139                                                     "root": "data",
140                                                     "totalProperty": "total",
141                                                     "xtype": "JsonReader",
142                                                     "|fields": "[\n    {\"name\":\"curr_id\",\"type\":\"int\"},\n    {\"name\":\"curr_name\",\"type\":\"string\"}\n]",
143                                                     "|xns": "Roo.data"
144                                                 }
145                                             ]
146                                         }
147                                     ]
148                                 }
149                             ]
150                         }
151                     ]
152                 },
153                 {
154                     "listeners": {
155                         "click": "function (_self, e)\n{\n   _this.dialog.hide();\n \n }"
156                     },
157                     "*prop": "buttons[]",
158                     "text": "Cancel",
159                     "xtype": "Button",
160                     "|xns": "Roo"
161                 },
162                 {
163                     "listeners": {
164                         "click": "function (_self, e)\n{\n    if (_this.form.findField('pohead_vend_id').getValue() < 1) {\n        Roo.MessageBox.alert(\"Error\", \"Select a vendor\");\n        return;\n    }\n    var last = _this.vendor.lastData;\n    \n    var data = _this.form.getFieldValues();\n    \n    data.pohead_terms_id_terms_descrip = last.vend_terms_id_terms_descrip;\n    data.pohead_terms_id = last.vend_terms_id;\n    \n    data.pohead_taxzone_id = last.vend_taxzone_id;\n    data.pohead_taxzone_id_taxzone_descrip = last.vend_taxzone_id_taxzone_descrip;\n    \n    _this.dialog.hide();\n    _this.callback(data);\n}"
165                     },
166                     "*prop": "buttons[]",
167                     "text": "OK",
168                     "xtype": "Button",
169                     "|xns": "Roo"
170                 }
171             ]
172         }
173     ],
174     "permname": "",
175     "modOrder": "001"
176 }