3 "name": "Pman.Dialog.XtupleProdcat",
6 "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleProdcat.bjs",
14 "title": "Edit / Create Product Category",
16 "xtype": "LayoutDialog",
21 "xtype": "LayoutRegion",
26 "xtype": "ContentPanel",
31 "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n if(_this.data.prodcat_id){\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.prodcat_id, '_with_salesaccnt' : 1 }}); \n }\n \n _this.form.findField('salesaccnt_sales_accnt_id_descrip').setValue('');\n _this.form.findField('salesaccnt_credit_accnt_id_descrip').setValue('');\n _this.form.findField('salesaccnt_cos_accnt_id_descrip').setValue('');\n return;\n }\n if (action.type == 'load') {\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",
32 "|rendered": "function (form)\n{\n _this.form= form;\n}\n"
36 "style": "margin:10px;",
38 "|url": "baseURL + '/Roo/Prodcat.php'",
42 "legend": "Product Category Detail",
43 "style": "width:380px",
49 "fieldLabel": "Category Code",
50 "name": "prodcat_code",
57 "fieldLabel": "Category Description",
58 "name": "prodcat_descrip",
66 "legend": "Account Setting",
67 "style": "width:380px",
78 "beforeselect": "function (combo, record, index)\n{\n _this.form.findField('salesaccnt_sales_accnt_id_descrip').setValue(record.data.accnt_descrip);\n}"
81 "displayField": "accnt_name",
83 "emptyText": "Select Account",
84 "fieldLabel": "Inventory Sales Account",
85 "forceSelection": true,
86 "hiddenName": "salesaccnt_sales_accnt_id",
88 "loadingText": "Searching...",
90 "name": "salesaccnt_sales_accnt_id_name",
92 "qtip": "Select Account",
93 "queryParam": "search[name]",
94 "selectOnFocus": true,
95 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{accnt_name} ( {accnt_descrip} )</b> </div>",
96 "triggerAction": "all",
98 "valueField": "accnt_id",
105 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.accnt_active = 1;\n o.params.accnt_type = 'R';\n}\n"
110 "|sortInfo": "{ direction : 'ASC', field: 'accnt_id' }",
116 "xtype": "HttpProxy",
117 "|url": "baseURL + '/Roo/accnt.php'",
124 "totalProperty": "total",
125 "xtype": "JsonReader",
126 "|fields": "[{\"name\":\"accnt_id\",\"type\":\"int\"},{\"name\":\"accnt_descrip\",\"type\":\"string\"}]",
138 "style": "margin-left:155px;",
143 "name": "salesaccnt_sales_accnt_id_descrip",
145 "xtype": "DisplayField",
157 "beforeselect": "function (combo, record, index)\n{\n _this.form.findField('salesaccnt_credit_accnt_id_descrip').setValue(record.data.accnt_descrip);\n}"
160 "displayField": "accnt_name",
162 "emptyText": "Select Account",
163 "fieldLabel": "Credit Memo Account",
164 "forceSelection": true,
165 "hiddenName": "salesaccnt_credit_accnt_id",
167 "loadingText": "Searching...",
169 "name": "salesaccnt_credit_accnt_id_name",
171 "qtip": "Select Account",
172 "queryParam": "search[name]",
173 "selectOnFocus": true,
174 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{accnt_name} ( {accnt_descrip} )</b> </div>",
175 "triggerAction": "all",
177 "valueField": "accnt_id",
184 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.accnt_active = 1;\n o.params.accnt_type = 'R';\n}\n"
189 "|sortInfo": "{ direction : 'ASC', field: 'accnt_id' }",
195 "xtype": "HttpProxy",
196 "|url": "baseURL + '/Roo/accnt.php'",
203 "totalProperty": "total",
204 "xtype": "JsonReader",
205 "|fields": "[{\"name\":\"accnt_id\",\"type\":\"int\"},{\"name\":\"accnt_descrip\",\"type\":\"string\"}]",
217 "style": "margin-left:155px;",
222 "name": "salesaccnt_credit_accnt_id_descrip",
224 "xtype": "DisplayField",
236 "beforeselect": "function (combo, record, index)\n{\n _this.form.findField('salesaccnt_cos_accnt_id_descrip').setValue(record.data.accnt_descrip);\n}"
239 "displayField": "accnt_name",
241 "emptyText": "Select Account",
242 "fieldLabel": "Cost of Sales Account",
243 "forceSelection": true,
244 "hiddenName": "salesaccnt_cos_accnt_id",
246 "loadingText": "Searching...",
248 "name": "salesaccnt_cos_accnt_id_name",
250 "qtip": "Select Account",
251 "queryParam": "search[name]",
252 "selectOnFocus": true,
253 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{accnt_name} ( {accnt_descrip} )</b> </div>",
254 "triggerAction": "all",
256 "valueField": "accnt_id",
263 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.accnt_active = 1;\n o.params.accnt_type = 'E';\n}\n"
268 "|sortInfo": "{ direction : 'ASC', field: 'accnt_id' }",
274 "xtype": "HttpProxy",
275 "|url": "baseURL + '/Roo/accnt.php'",
282 "totalProperty": "total",
283 "xtype": "JsonReader",
284 "|fields": "[{\"name\":\"accnt_id\",\"type\":\"int\"},{\"name\":\"accnt_descrip\",\"type\":\"string\"}]",
296 "style": "margin-left:155px;",
301 "name": "salesaccnt_cos_accnt_id_descrip",
303 "xtype": "DisplayField",
311 "name": "prodcat_id",
316 "name": "salesaccnt_id",
326 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
328 "*prop": "buttons[]",
335 "click": "function (_self, e)\n{\n // do some checks?\n \n \n // _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
337 "*prop": "buttons[]",