{ "id": "roo-file-332", "name": "Pman.Tab.XtupleSalesHistory", "parent": "Pman.Tab.XtupleSales", "title": "Pman.Tab.XtupleSalesHistory", "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleSalesHistory.bjs", "items": [ { "listeners": { "|activate": "function() {\n _this.hpanel = this;\n if (_this.hgrid) {\n _this.hgrid.footer.onClick('first');\n }\n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "cohist", "title": "Sales History", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|render": "function() \n{\n _this.hgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.hpanel.active) {\n this.footer.onClick('first');\n }\n}", "|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" }, "*prop": "grid", "autoExpandColumn": "item_descrip1", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self, o)\n{\n \n Roo.apply(o.params, {\n _group : 'salesHistory',\n _name : 'bydate',\n \n 'credit:text' : 'credit',\n 'return:text' : 'return',\n 'includeFormatted:int' : 1,\n 'startDate:text' : _this.dateFrom.getValue(),\n 'endDate:text' : _this.dateTo.getValue()\n \n });\n \n if (_this.custSel.getValue()) {\n o.params['cust_id:number'] = _this.custSel.getValue();\n }\n \n if (_this.countrySel.getValue()) {\n o.params['addr_country:text'] = _this.countrySel.getValue();\n }\n \n if (_this.postalCodeSel.getValue()) {\n o.params['addr_postalcode:text'] = _this.postalCodeSel.getValue();\n }\n \n if (_this.itemSel.getValue()) {\n o.params['item_id:number'] = _this.itemSel.getValue();\n }\n \n if (_this.orderRep.getValue()) {\n o.params['cohist_salesrep_id:number'] = _this.orderRep.getValue();\n }\n \n if (_this.custRep.getValue()) {\n o.params['cust_salesrep_id:number'] = _this.custRep.getValue();\n }\n \n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'cohist_shipvia', direction: 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/metasql.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'cohist_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_cust_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_itemsite_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_shipdate',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'cohist_shipvia',\n 'type': 'string'\n },\n {\n 'name': 'cohist_ordernumber',\n 'type': 'string'\n },\n {\n 'name': 'cohist_orderdate',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'cohist_invcnumber',\n 'type': 'string'\n },\n {\n 'name': 'cohist_invcdate',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'cohist_qtyshipped',\n 'type': 'float'\n },\n {\n 'name': 'cohist_unitprice',\n 'type': 'float'\n },\n {\n 'name': 'cohist_shipto_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_salesrep_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_duedate',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'cohist_imported',\n 'type': 'int'\n },\n {\n 'name': 'cohist_billtoname',\n 'type': 'string'\n },\n {\n 'name': 'cohist_billtoaddress1',\n 'type': 'string'\n },\n {\n 'name': 'cohist_billtoaddress2',\n 'type': 'string'\n },\n {\n 'name': 'cohist_billtoaddress3',\n 'type': 'string'\n },\n {\n 'name': 'cohist_billtocity',\n 'type': 'string'\n },\n {\n 'name': 'cohist_billtostate',\n 'type': 'string'\n },\n {\n 'name': 'cohist_billtozip',\n 'type': 'string'\n },\n {\n 'name': 'cohist_shiptoname',\n 'type': 'string'\n },\n {\n 'name': 'cohist_shiptoaddress1',\n 'type': 'string'\n },\n {\n 'name': 'cohist_shiptoaddress2',\n 'type': 'string'\n },\n {\n 'name': 'cohist_shiptoaddress3',\n 'type': 'string'\n },\n {\n 'name': 'cohist_shiptocity',\n 'type': 'string'\n },\n {\n 'name': 'cohist_shiptostate',\n 'type': 'string'\n },\n {\n 'name': 'cohist_shiptozip',\n 'type': 'string'\n },\n {\n 'name': 'cohist_commission',\n 'type': 'float'\n },\n {\n 'name': 'cohist_commissionpaid',\n 'type': 'int'\n },\n {\n 'name': 'cohist_unitcost',\n 'type': 'float'\n },\n {\n 'name': 'cohist_misc_type',\n 'type': 'string'\n },\n {\n 'name': 'cohist_misc_descrip',\n 'type': 'string'\n },\n {\n 'name': 'cohist_misc_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_doctype',\n 'type': 'string'\n },\n {\n 'name': 'cohist_promisedate',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'cohist_ponumber',\n 'type': 'string'\n },\n {\n 'name': 'cohist_curr_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_sequence',\n 'type': 'int'\n },\n {\n 'name': 'cohist_taxtype_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_taxzone_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_curr_id_curr_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_curr_id_curr_base',\n 'type': 'int'\n },\n {\n 'name': 'cohist_curr_id_curr_name',\n 'type': 'string'\n },\n {\n 'name': 'cohist_curr_id_curr_symbol',\n 'type': 'string'\n },\n {\n 'name': 'cohist_curr_id_curr_abbr',\n 'type': 'string'\n },\n {\n 'name': 'cohist_taxzone_id_taxzone_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_taxzone_id_taxzone_code',\n 'type': 'string'\n },\n {\n 'name': 'cohist_taxzone_id_taxzone_descrip',\n 'type': 'string'\n },\n {\n 'name': 'cohist_taxtype_id_taxtype_id',\n 'type': 'int'\n },\n {\n 'name': 'cohist_taxtype_id_taxtype_name',\n 'type': 'string'\n },\n {\n 'name': 'cohist_taxtype_id_taxtype_descrip',\n 'type': 'string'\n },\n {\n 'name': 'cohist_taxtype_id_taxtype_sys',\n 'type': 'int'\n }\n]" } ] }, { "*prop": "footer", "displayInfo": true, "displayMsg": "Displaying Sales History {0} - {1} of {2}", "emptyMsg": "No cohist found", "pageSize": 25, "xtype": "PagingToolbar", "|xns": "Roo", "items": [ { "text": "", "xtype": "TextItem", "|xns": "Roo.Toolbar" } ] }, { "*prop": "toolbar", "xtype": "Toolbar", "|xns": "Roo", "items": [ { "listeners": { "render": "function (_self)\n{\n _this.custSel = _self;\n}" }, "allowBlank": true, "displayField": "cust_name", "editable": true, "emptyText": "Select Customer", "fieldLabel": "cust_name", "forceSelection": true, "hiddenName": "cust_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cust_name", "pageSize": 20, "qtip": "Select Customer", "queryParam": "query[cust_name]", "selectOnFocus": true, "tpl": "