{ "id": "roo-file-48", "name": "Pman.Tab.XtupleCreditMemos", "parent": "Pman.Tab.XtupleSales", "title": "Pman.Tab.XtupleCreditMemos", "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleCreditMemos.bjs", "items": [ { "listeners": { "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "cmhead", "title": "Credit Memos", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|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}", "|rowdblclick": "function (_self, rowIndex, e)\n{\n var s = this.dataSource.getAt(rowIndex);\n Pman.Dialog.XtupleCreditMemo.show({\n cmhead_id : s.data.cmhead_id\n },function() {\n _this.grid.footer.onClick('first');\n \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" }, "*prop": "grid", "autoExpandColumn": "cmhead_cust_id_cust_name", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self, o)\n{\n if ( _this.customer && _this.customer.getValue() ) {\n o.params.cmhead_cust_id = _this.customer.getValue();\n }\n if (_this.cmnumber && _this.cmnumber.getValue() ) {\n o.params.cmhead_id = _this.cmnumber.getValue();\n }\n if (_this.status) { \n o.params['query[status]'] = _this.status.getValue();\n }\n \n o.params._with_aropen = 1;\n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'cmhead_id', direction: 'DESC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|url": "baseURL + '/Roo/cmhead.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'cmhead_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_number',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_posted',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_invcnumber',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_custponumber',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_cust_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_docdate',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'cmhead_shipto_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_shipto_name',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_shipto_address1',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_shipto_address2',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_shipto_address3',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_shipto_city',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_shipto_state',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_shipto_zipcode',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_salesrep_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_freight',\n 'type': 'float'\n },\n {\n 'name': 'cmhead_misc',\n 'type': 'float'\n },\n {\n 'name': 'cmhead_comments',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_printed',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_billtoname',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_billtoaddress1',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_billtoaddress2',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_billtoaddress3',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_billtocity',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_billtostate',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_billtozip',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_hold',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_commission',\n 'type': 'float'\n },\n {\n 'name': 'cmhead_misc_accnt_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_misc_descrip',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_rsncode_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_curr_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_freighttaxtype_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_gldistdate',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'cmhead_billtocountry',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_shipto_country',\n 'type': 'string'\n },\n {\n 'name': 'cmhead_rahead_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_taxzone_id',\n 'type': 'int'\n },\n {\n 'name': 'cmhead_prj_id',\n 'type': 'int'\n }\n]" } ] }, { "*prop": "footer", "xtype": "PagingToolbar", "pageSize": 25, "displayInfo": true, "displayMsg": "Displaying cmhead{0} - {1} of {2}", "emptyMsg": "No cmhead found", "|xns": "Roo", "items": [ { "listeners": { "click": "function (_self, e)\n{\n new Pman.Download({\n grid : _this.grid\n });\n Roo.MessageBox.alert(\"Notice\", \"Report is downloading\");\n}" }, "text": "Download", "xtype": "Button", "|xns": "Roo.Toolbar" } ] }, { "*prop": "toolbar", "xtype": "Toolbar", "|xns": "Roo", "items": [ { "listeners": { "render": "function (_self)\n{\n _this.cmnumber = _self;\n}", "select": "function (combo, record, index)\n{\n Roo.log('select');\n _this.grid.footer.onClick('first');\n}" }, "allowBlank": true, "displayField": "cmhead_number", "editable": true, "emptyText": "Order", "fieldLabel": "ordernumber", "forceSelection": true, "hiddenName": "cmhead_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cmhead_number", "pageSize": 20, "qtip": "Select invchead", "queryParam": "query[cmhead_number]", "selectOnFocus": true, "tpl": "