3 "name": "Pman.Dialog.XtupleCreditMemoNew",
6 "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleCreditMemoNew.bjs",
10 "show": "function (_self)\n{\n _this.form.findField('cmhead_cust_id').focus();\n}"
16 "title": "Create new Credit Memo",
18 "xtype": "LayoutDialog",
23 "xtype": "LayoutRegion",
28 "xtype": "ContentPanel",
33 "rendered": "function (form)\n{\n _this.form = form;\n}"
40 "add": "function (combo)\n{\n \n Pman.Dialog.XtupleCustomer.show( { id : 0 } , function(res) {\n Roo.log(res);\n // fill in customer\n _this.form.findField('cmhed_cust_id_cust_name').setValue(res.cust_id);\n _this.form.findField('cmhed_cust_id_cust_name').el.dom.value = res.cust_name;\n \n })\n \n}\n\n"
43 "displayField": "cust_name",
45 "fieldLabel": "Select Customer",
46 "forceSelection": true,
47 "hiddenName": "cmhead_cust_id",
49 "loadingText": "Searching...",
51 "name": "cmhead_cust_id_cust_name",
53 "qtip": "Select custinfo",
54 "queryParam": "query[cust_name]",
55 "selectOnFocus": true,
56 "tpl": "<div class=\"x-grid-cell-text x-btn button\">{cust_number}: <b>{cust_name}</b> </div>",
57 "triggerAction": "all",
59 "valueField": "cust_id",
66 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n // o.params._with_last_location = 1;\n}\n"
71 "|sortInfo": "{ direction : 'ASC', field: 'cust_name' }",
79 "|url": "baseURL + '/Roo/custinfo.php'"
83 "xtype": "JsonReader",
87 "totalProperty": "total",
88 "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]"
100 "click": "function (_self, e)\n{\n _this.dialog.hide();\n \n }"
102 "*prop": "buttons[]",
109 "click": "function (_self, e)\n{\n //_this.findField('cuinfo_\n \n // check if customer is filled in.\n if (_this.form.findField('cmhead_cust_id').getValue() < 1) {\n Roo.MessageBox.alert(\"Error\", \"Select a customer\");\n return;\n }\n \n var data = _this.form.getFieldValues();\n var c = _this.form.findField('cmhead_cust_id').lastData;\n \n data.cmhead_curr_id = c.cust_curr_id;\n data.cmhead_curr_id_curr_name = c.cust_curr_id_curr_name;\n \n data.cmhead_terms_id = c.cust_terms_id;\n data.cmhead_terms_id_terms_descrip = c.cust_terms_id_terms_descrip;\n \n // fill in staff in/c..\n \n data.cmhead_salesrep_id = Pman.Login.authUser.salesrep.salesrep_id;\n data.cmhead_salesrep_id_salesrep_name = Pman.Login.authUser.salesrep.salesrep_name;\n \n data.cmhead_docdate = new Date();\n \n data.cmhead_taxzone_id = c.cust_taxzone_id;\n data.cmhead_taxzone_id_taxzone_descrip = c.cust_taxzone_id_taxzone_descrip;\n data.cmhead_location_id = c.default_location_id,\n data.cmhead_location_id_location_name = c.default_location_name;\n\n Pman.Dialog.XtupleCreditMemo.show(data, function() {\n _this.dialog.hide();\n _this.callback();\n }); \n \n}"
111 "*prop": "buttons[]",