{ "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": "
{cust_name}
", "triggerAction": "all", "typeAhead": true, "valueField": "cust_id", "width": 150, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'cust_name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|xns": "Roo.data", "|url": "baseURL + '/Roo/custinfo.php'" }, { "*prop": "reader", "xtype": "JsonReader", "|xns": "Roo.data", "id": "cust_id", "root": "data", "totalProperty": "total", "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]" } ] } ] }, { "listeners": { "render": "function (_self)\n{\n _this.countrySel = _self;\n}" }, "allowBlank": true, "displayField": "addr_country", "editable": true, "emptyText": "Select Country", "fieldLabel": "addr_country", "forceSelection": true, "hiddenName": "addr_country", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "addr_country", "pageSize": 20, "qtip": "Select Country", "queryParam": "query[addr_country]", "selectOnFocus": true, "tpl": "
{addr_country}
", "triggerAction": "all", "typeAhead": true, "valueField": "addr_country", "width": 100, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n o.params._distinct = 'addr_country';\n o.params._columns = 'addr_country'; \n o.params['!addr_country'] = ''; \n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'addr_country' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/addr.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "addr_country", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{\"name\":\"addr_country\",\"type\":\"string\"}]", "|xns": "Roo.data" } ] } ] }, { "listeners": { "render": "function (_self)\n{\n _this.postalCodeSel = _self;\n}" }, "allowBlank": true, "displayField": "addr_postalcode", "editable": true, "emptyText": "Select Postal Code", "fieldLabel": "addr_postalcode", "forceSelection": true, "hiddenName": "addr_postalcode", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "addr_postalcode", "pageSize": 20, "qtip": "Select Postal Code", "queryParam": "query[addr_postalcode]", "selectOnFocus": true, "tpl": "
{addr_postalcode}
", "triggerAction": "all", "typeAhead": true, "valueField": "addr_postalcode", "width": 100, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n o.params._distinct = 'addr_postalcode';\n o.params._columns = 'addr_postalcode'; \n o.params['!addr_postalcode'] = ''; \n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'addr_postalcode' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/addr.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "addr_postalcode", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{\"name\":\"addr_postalcode\",\"type\":\"string\"}]", "|xns": "Roo.data" } ] } ] }, { "listeners": { "render": "function (_self)\n{\n _this.itemSel = _self;\n}" }, "allowBlank": true, "displayField": "item_number", "editable": true, "emptyText": "Select Item Number", "fieldLabel": "item_number", "forceSelection": true, "hiddenName": "item_number", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "item_number", "pageSize": 20, "qtip": "Select Item Number", "queryParam": "query[number_or_name]", "selectOnFocus": true, "tpl": "
{item_number}
", "triggerAction": "all", "typeAhead": true, "valueField": "item_id", "width": 100, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'item_number' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Item.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "item_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{\"name\":\"item_id\",\"type\":\"int\"},\"item_number\"]", "|xns": "Roo.data" } ] } ] }, { "listeners": { "render": "function (_self)\n{\n _this.orderRep = _self;\n}" }, "allowBlank": true, "displayField": "salesrep_name", "editable": true, "emptyText": "Order Sales Rep", "fieldLabel": "Order Sales Rep", "forceSelection": true, "hiddenName": "salesrep_name", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "salesrep_name", "pageSize": 20, "qtip": "Select Order Sales Rep", "queryParam": "query[name]", "selectOnFocus": true, "tpl": "
{salesrep_name}
", "triggerAction": "all", "typeAhead": true, "valueField": "salesrep_id", "width": 120, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n o.params.salesrep_active = 1\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'salesrep_id' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Salesrep.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "salesrep_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{\"name\":\"salesrep_id\",\"type\":\"int\"}]", "|xns": "Roo.data" } ] } ] }, { "listeners": { "render": "function (_self)\n{\n _this.custRep = _self;\n}" }, "allowBlank": true, "displayField": "salesrep_name", "editable": true, "emptyText": "Customer Sales Rep", "fieldLabel": "Customer Sales Rep", "forceSelection": true, "hiddenName": "salesrep_name", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "salesrep_name", "pageSize": 20, "qtip": "Select Customer Sales Rep", "queryParam": "query[name]", "selectOnFocus": true, "tpl": "
{salesrep_name}
", "triggerAction": "all", "typeAhead": true, "valueField": "salesrep_id", "width": 120, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n o.params.salesrep_active = 1\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'salesrep_id' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Salesrep.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "salesrep_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{\"name\":\"salesrep_id\",\"type\":\"int\"}]", "|xns": "Roo.data" } ] } ] }, { "text": "From", "xtype": "TextItem", "|xns": "Roo.Toolbar" }, { "listeners": { "render": "function (_self)\n{\n _this.dateFrom = _self;\n}" }, "format": "d/M/Y", "useIso": true, "xtype": "DateField", "|value": "(function() {return (new Date()).add(Date.MONTH, -3); })()", "|xns": "Roo.form" }, { "text": "To", "xtype": "TextItem", "|xns": "Roo.Toolbar" }, { "listeners": { "render": "function (_self)\n{\n_this.dateTo = _self;\n}" }, "format": "d/M/Y", "useIso": true, "xtype": "DateField", "|value": "(function() {return (new Date()) })()", "|xns": "Roo.form" }, { "listeners": { "click": "function (_self, e)\n{\n _this.hgrid.footer.onClick('first');\n}" }, "text": "Refresh", "xtype": "Button", "|xns": "Roo.Toolbar" }, { "|xns": "Roo.Toolbar", "xtype": "Fill" }, { "text": "Download", "xtype": "Button", "|xns": "Roo.Toolbar", "items": [ { "|xns": "Roo.menu", "xtype": "Menu", "*prop": "menu", "items": [ { "listeners": { "click": "function (_self, e)\n{\n var o = { params : {}};\n Roo.apply(o.params, {\n _group : 'salesHistory',\n _name : 'bydate',\n csvCols : '*', csvTitles : '*',\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 limit : 99999\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 \n new Pman.Download({\n url: baseURL + '/Roo/Metasql',\n params : o.params,\n limit : 100000,\n newWindow : true\n });\n}" }, "text": "Sales History", "xtype": "Item", "|xns": "Roo.menu" }, { "listeners": { "click": "function (_self, e)\n{\n var o = { params : {}};\n Roo.apply(o.params, {\n _group : 'salesHistory',\n _name : 'stockist',\n csvCols : '*', csvTitles : '*',\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 limit : 99999\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 \n new Pman.Download({\n url: baseURL + '/Roo/Metasql',\n params : o.params,\n limit : 100000,\n newWindow : true\n });\n}" }, "text": "Stockists Summary", "xtype": "Item", "|xns": "Roo.menu" } ] } ] } ] }, { "*prop": "colModel[]", "dataIndex": "cust_id", "header": "Cust#", "width": 50, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "cust_name", "header": "Customer", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "order_salesrep_name", "header": "Order Sales Rep", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "cust_salesrep_name", "header": "Customer Sales Rep", "hidden": true, "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "addr_country", "header": "Country", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "addr_city", "header": "City", "hidden": true, "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "addr_state", "header": "State", "hidden": true, "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "addr_postalcode", "header": "Postal Code", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "cohist_ordernumber", "header": "Order", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "cohead_orderdate", "header": "Order date", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { \n var d = Date.parseDate(v, 'Y-m-d');\n return String.format('{0}', d ? d.format('d/M/Y') : '');\n }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "invmonth", "header": "Invoice Month", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { \n \n return String.format('{0}', v);\n }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "cohist_invcdate", "header": "Invoice date", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { \n var d = Date.parseDate(v, 'Y-m-d');\n return String.format('{0}', d ? d.format('d/M/Y') : '');\n }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "cohist_invcnumber", "header": "Invoice#", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "item_brand", "header": "Brand", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "item_number", "header": "Item No.", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "item_descrip1", "header": "Description", "width": 200, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cohist_qtyshipped", "header": "Shipped", "width": 70, "xtype": "ColumnModel", "|renderer": "function(v) { return parseInt(v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "currabbr", "header": "Currency", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v.split(/\\s+/)[0]); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cohist_unitprice", "header": "Unit Price", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return Roo.util.Format.number( v, 2); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "extprice", "header": "Ext Cost", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return Roo.util.Format.number( v, 2); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "extpricebase", "header": "Ext Price (Base)", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return Roo.util.Format.number( v, 2); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "baseunitprice", "header": "Unit Price (Base)", "hidden": true, "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return Roo.util.Format.number( v, 2); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "basefifovalue", "header": "Fifo Cost", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return Roo.util.Format.number( v, 2); }", "|xns": "Roo.grid" } ] } ] } ], "permname": "", "modOrder": "400" }