{
- "id": "roo-file-236",
- "name": "Pman.Tab.XtupleApAging",
- "parent": "Pman.Tab.XtupleAccountsTab",
- "title": "",
- "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleApAging.bjs",
- "items": [
+ "name" : "Pman.Tab.XtupleApAging",
+ "parent" : "Pman.Tab.XtupleAccountsTab",
+ "title" : "",
+ "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleApAging.bjs",
+ "permname" : "",
+ "modOrder" : "500",
+ "items" : [
{
- "background": true,
- "fitContainer": true,
- "fitToFrame": true,
- "region": "center",
- "title": "Accounts Payable",
- "xtype": "NestedLayoutPanel",
- "|xns": "Roo",
- "items": [
+ "fitToFrame" : true,
+ "background" : true,
+ "region" : "center",
+ "title" : "Accounts Payable",
+ "xtype" : "NestedLayoutPanel",
+ "fitContainer" : true,
+ "$ xns" : "Roo",
+ "items" : [
{
- "|xns": "Roo",
- "xtype": "BorderLayout",
- "*prop": "layout",
- "items": [
+ "xtype" : "BorderLayout",
+ "$ xns" : "Roo",
+ "* prop" : "layout",
+ "items" : [
{
- "*prop": "center",
- "xtype": "LayoutRegion",
- "|xns": "Roo"
+ "xtype" : "LayoutRegion",
+ "$ xns" : "Roo",
+ "* prop" : "center"
},
{
- "listeners": {
- "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
+ "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": "apopen",
- "title": "ApAging",
- "xtype": "GridPanel",
- "|xns": "Roo",
- "items": [
+ "fitToframe" : true,
+ "background" : true,
+ "region" : "center",
+ "title" : "ApAging",
+ "xtype" : "GridPanel",
+ "fitContainer" : true,
+ "$ xns" : "Roo",
+ "tableName" : "apopen",
+ "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}"
+ "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}"
},
- "*prop": "grid",
- "autoExpandColumn": "araging_cust_name",
- "loadMask": true,
- "xtype": "Grid",
- "|xns": "Roo.grid",
- "items": [
+ "autoExpandColumn" : "araging_cust_name",
+ "xtype" : "Grid",
+ "loadMask" : true,
+ "$ xns" : "Roo.grid",
+ "* prop" : "grid",
+ "items" : [
{
- "listeners": {
- "beforeload": "function (_self, o)\n{\n o.params = o.params || {};\n \n\n \n var dt = _this.relDate.getValue();\n \n var params = {\n _group : 'apAging',\n _name : 'bydate',\n 'relDate:text' : typeof(dt) == 'string' ? dt : dt.format('Y-m-d'),\n 'useDocDate:text' : false\n };\n \n var cs = _this.customerSel.getValue();\n if (cs*1) {\n params['cust_id:number'] = cs;\n \n }\n \n \n Roo.apply(o.params,params);\n}"
+ "xtype" : "RowSelectionModel",
+ "singleSelect" : true,
+ "$ xns" : "Roo.grid",
+ "* prop" : "sm"
+ },
+ {
+ "listeners" : {
+ "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n\n \n var dt = _this.relDate.getValue();\n \n var params = {\n _group : 'apAging',\n _name : 'bydate',\n 'relDate:text' : typeof(dt) == 'string' ? dt : dt.format('Y-m-d'),\n 'useDocDate:text' : false\n };\n \n var vend = _this.vendSel.getValue();\n if (vend*1) {\n params['vend_id:number'] = vend;\n \n }\n \n \n Roo.apply(o.params,params);\n}"
},
- "*prop": "dataSource",
- "remoteSort": true,
- "xtype": "Store",
- "|xns": "Roo.data",
- "items": [
+ "xtype" : "Store",
+ "remoteSort" : true,
+ "$ xns" : "Roo.data",
+ "* prop" : "dataSource",
+ "items" : [
{
- "*prop": "proxy",
- "method": "GET",
- "timeout": 600000,
- "xtype": "HttpProxy",
- "|url": "baseURL + '/Roo/Metasql.php'",
- "|xns": "Roo.data"
+ "$ url" : "baseURL + '/Roo/Metasql.php'",
+ "method" : "GET",
+ "xtype" : "HttpProxy",
+ "timeout" : 600000,
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy"
},
{
- "*prop": "reader",
- "id": "id",
- "root": "data",
- "totalProperty": "total",
- "xtype": "JsonReader",
- "|fields": "[\n {\n 'name': 'apaging_doctype',\n 'type': 'string'\n }\n]",
- "|xns": "Roo.data"
+ "id" : "id",
+ "root" : "data",
+ "xtype" : "JsonReader",
+ "$ fields" : "[\n {\n 'name': 'apaging_doctype',\n 'type': 'string'\n }\n]",
+ "$ xns" : "Roo.data",
+ "* prop" : "reader",
+ "totalProperty" : "total"
}
]
},
{
- "|xns": "Roo",
- "xtype": "Toolbar",
- "*prop": "toolbar",
- "items": [
+ "xtype" : "Toolbar",
+ "$ xns" : "Roo",
+ "* prop" : "toolbar",
+ "items" : [
{
- "listeners": {
- "render": "function (_self)\n{\n _this.customerSel = _self;\n}",
- "select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}"
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.vendSel = _self;\n}",
+ "select" : "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\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": "cust_name:text",
- "selectOnFocus": true,
- "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{cust_name}</b> </div>",
- "triggerAction": "all",
- "typeAhead": true,
- "valueField": "cust_id",
- "width": 300,
- "xtype": "ComboBox",
- "|xns": "Roo.form",
- "items": [
+ "listWidth" : 400,
+ "triggerAction" : "all",
+ "fieldLabel" : "cust_name",
+ "forceSelection" : true,
+ "selectOnFocus" : true,
+ "pageSize" : 20,
+ "displayField" : "vend_name",
+ "emptyText" : "Select Vendor",
+ "hiddenName" : "vend_id",
+ "minChars" : 2,
+ "valueField" : "vend_id",
+ "xtype" : "ComboBox",
+ "allowBlank" : true,
+ "typeAhead" : true,
+ "editable" : true,
+ "width" : 300,
+ "$ xns" : "Roo.form",
+ "name" : "vend_name",
+ "qtip" : "Select Vendor",
+ "queryParam" : "vend_name:text",
+ "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{vend_name}</b> </div>",
+ "loadingText" : "Searching...",
+ "items" : [
{
- "listeners": {
- "|beforeload": "function (_self, o){\n o.params = o.params || {};\n\n if (!_this.relDate) {\n return false;\n }\n var dt = _this.relDate.getValue(); \n // set more here\n o.params['_group'] = 'apAging';\n o.params['_name'] = 'customers';\n o.params['relDate:text'] = typeof(dt) == 'string' ? dt : dt.format('Y-m-d');\n o.params['useDocDate:text'] = false \n}\n"
+ "listeners" : {
+ "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n\n if (!_this.relDate) {\n return false;\n }\n var dt = _this.relDate.getValue(); \n // set more here\n o.params['_group'] = 'apAging';\n o.params['_name'] = 'vendors';\n o.params['relDate:text'] = typeof(dt) == 'string' ? dt : dt.format('Y-m-d');\n o.params['useDocDate:text'] = false \n}\n"
},
- "*prop": "store",
- "remoteSort": true,
- "xtype": "Store",
- "|sortInfo": "{ direction : 'ASC', field: 'cust_name' }",
- "|xns": "Roo.data",
- "items": [
+ "xtype" : "Store",
+ "remoteSort" : true,
+ "$ sortInfo" : "{ direction : 'ASC', field: 'cust_name' }",
+ "$ xns" : "Roo.data",
+ "* prop" : "store",
+ "items" : [
{
- "*prop": "proxy",
- "method": "GET",
- "xtype": "HttpProxy",
- "|url": "baseURL + '/Roo/metasql.php'",
- "|xns": "Roo.data"
+ "$ url" : "baseURL + '/Roo/metasql.php'",
+ "xtype" : "HttpProxy",
+ "method" : "GET",
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy"
},
{
- "*prop": "reader",
- "xtype": "JsonReader",
- "|xns": "Roo.data",
- "id": "cust_id",
- "root": "data",
- "totalProperty": "total",
- "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]"
+ "id" : "cust_id",
+ "root" : "data",
+ "xtype" : "JsonReader",
+ "$ fields" : "[{\"name\":\"vend_id\",\"type\":\"int\"},\"vend_name\"]",
+ "$ xns" : "Roo.data",
+ "* prop" : "reader",
+ "totalProperty" : "total"
}
]
}
]
},
{
- "text": "as Of:",
- "xtype": "TextItem",
- "|xns": "Roo.Toolbar"
+ "text" : "as Of:",
+ "xtype" : "TextItem",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "listeners" : {
+ "render" : "function (_self)\r\n{\r\n _this.relDate = _self;\r\n _self.setValue( new Date() );\r\n}",
+ "select" : "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}"
+ },
+ "format" : "Y-m-d",
+ "xtype" : "DateField",
+ "allowBlank" : false,
+ "width" : 100,
+ "$ xns" : "Roo.form"
+ },
+ {
+ "xtype" : "Fill",
+ "$ xns" : "Roo.Toolbar"
},
{
- "listeners": {
- "render": "function (_self)\r\n{\r\n _this.relDate = _self;\r\n _self.setValue( new Date() );\r\n}",
- "select": "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}"
+ "listeners" : {
+ "|click" : "function ()\n{\n var s = _this.grid.getSelectionModel().getSelected();\n \n if(!s || s.data.apopen_id * 1 < 1){\n Roo.MessageBox.alert('Error', 'Please select a row');\n return;\n }\n \n if(s.data.apaging_doctype != 'V'){\n Roo.MessageBox.alert('Error', 'We just can handle voucher at the time being');\n return;\n }\n \n Roo.MessageBox.confirm(\"Are you sure\", \"Are you sure you want to VOID that?\",\n function(r) {\n if (r != 'yes') {\n return;\n }\n new Pman.Request({\n mask : 'Voiding',\n url : baseURL + '/Roo/Apopen',\n method : 'POST',\n params : {\n apopen_id : s.data.apopen_id,\n _void : 1\n },\n success : function() {\n _this.grid.footer.onClick('first');\n }\n })\n \n }\n );\n \n \n \n}"
},
- "allowBlank": false,
- "format": "Y-m-d",
- "width": 100,
- "xtype": "DateField",
- "|xns": "Roo.form"
+ "text" : "Void",
+ "xtype" : "Button",
+ "cls" : "x-btn-text-icon",
+ "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+ "$ xns" : "Roo.Toolbar"
}
]
},
{
- "*prop": "footer",
- "displayInfo": true,
- "displayMsg": "Displaying araging{0} - {1} of {2}",
- "emptyMsg": "Nothing found",
- "pageSize": 25,
- "xtype": "PagingToolbar",
- "|xns": "Roo"
+ "pageSize" : 25,
+ "xtype" : "PagingToolbar",
+ "emptyMsg" : "Nothing found",
+ "$ xns" : "Roo",
+ "displayMsg" : "Displaying araging{0} - {1} of {2}",
+ "displayInfo" : true,
+ "* prop" : "footer"
},
{
- "*prop": "colModel[]",
- "dataIndex": "apaging_docdate",
- "header": "Date",
- "width": 100,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n var d = Date.parseDate(v, 'Y-m-d');\n\n return String.format('{0}', d.format('d/M/Y')); \n}",
- "|xns": "Roo.grid"
+ "xtype" : "ColumnModel",
+ "header" : "Date",
+ "width" : 100,
+ "$ renderer" : "function(v) { \n var d = Date.parseDate(v, 'Y-m-d');\n\n return String.format('{0}', d.format('d/M/Y')); \n}",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_docdate"
},
{
- "*prop": "colModel[]",
- "dataIndex": "apaging_vend_name",
- "header": "Vendor",
- "width": 200,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid"
+ "xtype" : "ColumnModel",
+ "header" : "Vendor",
+ "width" : 200,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_vend_name"
},
{
- "*prop": "colModel[]",
- "dataIndex": "apaging_doctype",
- "header": "Doc Type",
- "width": 120,
- "xtype": "ColumnModel",
- "|renderer": "function(v) {\n switch(v) {\n case 'I':\n return \"Invoice\";\n case 'C':\n return \"Credit Memo\"; \n case 'D':\n return \"Debit Memo\"; \n case 'R':\n return \"Cash Receipt\"; \n default:\n return String.format('{0}', v); \n }\n }",
- "|xns": "Roo.grid"
+ "xtype" : "ColumnModel",
+ "header" : "Doc Type",
+ "width" : 120,
+ "$ renderer" : "function(v) {\n switch(v) {\n case 'I':\n return \"Invoice\";\n case 'C':\n return \"Credit Memo\"; \n case 'D':\n return \"Debit Memo\"; \n case 'R':\n return \"Cash Receipt\"; \n case 'V':\n return \"Voucher\"; \n default:\n return String.format('{0}', v); \n }\n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_doctype"
},
{
- "*prop": "colModel[]",
- "dataIndex": "apaging_docnumber",
- "header": "Docnumber",
- "width": 120,
- "xtype": "ColumnModel",
- "|renderer": "function(v) {\n \n return String.format('{0}', v); \n \n }",
- "|xns": "Roo.grid"
+ "xtype" : "ColumnModel",
+ "header" : "Docnumber",
+ "width" : 120,
+ "$ renderer" : "function(v) {\n \n return String.format('{0}', v); \n \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_docnumber"
},
{
- "*prop": "colModel[]",
- "dataIndex": "apaging_curr_symbol",
- "header": "Currency",
- "width": 120,
- "xtype": "ColumnModel",
- "|renderer": "function(v) {\n \n return String.format('{0}', v); \n \n }",
- "|xns": "Roo.grid"
+ "xtype" : "ColumnModel",
+ "header" : "Currency",
+ "width" : 120,
+ "$ renderer" : "function(v) {\n \n return String.format('{0}', v); \n \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_curr_symbol"
},
{
- "*prop": "colModel[]",
- "align": "right",
- "dataIndex": "apaging_apopen_amount",
- "header": "Value",
- "width": 100,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
- "|xns": "Roo.grid"
+ "align" : "right",
+ "xtype" : "ColumnModel",
+ "header" : "Value",
+ "width" : 100,
+ "$ renderer" : "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_apopen_amount"
},
{
- "*prop": "colModel[]",
- "align": "right",
- "dataIndex": "apaging_cur_val",
- "header": "30 Days",
- "width": 100,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
- "|xns": "Roo.grid"
+ "align" : "right",
+ "xtype" : "ColumnModel",
+ "header" : "30 Days",
+ "width" : 100,
+ "$ renderer" : "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_cur_val"
},
{
- "*prop": "colModel[]",
- "align": "right",
- "dataIndex": "apaging_sixty_val",
- "header": "60 Days",
- "width": 100,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
- "|xns": "Roo.grid"
+ "align" : "right",
+ "xtype" : "ColumnModel",
+ "header" : "60 Days",
+ "width" : 100,
+ "$ renderer" : "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_sixty_val"
},
{
- "*prop": "colModel[]",
- "align": "right",
- "dataIndex": "apaging_ninety_val",
- "header": "90 Days",
- "width": 100,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
- "|xns": "Roo.grid"
+ "align" : "right",
+ "xtype" : "ColumnModel",
+ "header" : "90 Days",
+ "width" : 100,
+ "$ renderer" : "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_ninety_val"
},
{
- "*prop": "colModel[]",
- "align": "right",
- "dataIndex": "apaging_plus_val",
- "header": "Over 90 days",
- "width": 150,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
- "|xns": "Roo.grid"
+ "align" : "right",
+ "xtype" : "ColumnModel",
+ "header" : "Over 90 days",
+ "width" : 150,
+ "$ renderer" : "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_plus_val"
},
{
- "*prop": "colModel[]",
- "align": "right",
- "dataIndex": "apaging_total_val",
- "header": "Total",
- "width": 150,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
- "|xns": "Roo.grid"
+ "align" : "right",
+ "xtype" : "ColumnModel",
+ "header" : "Total",
+ "width" : 150,
+ "$ renderer" : "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_total_val"
},
{
- "*prop": "colModel[]",
- "align": "right",
- "dataIndex": "apaging_base_total",
- "header": "Total (BASE)",
- "width": 150,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
- "|xns": "Roo.grid"
+ "align" : "right",
+ "xtype" : "ColumnModel",
+ "header" : "Total (BASE)",
+ "width" : 150,
+ "$ renderer" : "function(v) { \n\n return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n Roo.util.Format.usMoney(v)); \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "apaging_base_total"
}
]
}
}
]
}
- ],
- "permname": "",
- "modOrder": "400"
+ ]
}
\ No newline at end of file