3 "name": "Pman.Tab.XtuplePriceLists",
4 "parent": "Pman.Tab.XtupleManage",
5 "title": "Pman.Tab.XtuplePriceLists",
6 "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtuplePriceLists.bjs",
13 "title": "Price List",
14 "xtype": "NestedLayoutPanel",
19 "xtype": "BorderLayout",
24 "xtype": "LayoutRegion",
31 "xtype": "LayoutRegion",
36 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
42 "tableName": "ipshead",
43 "title": "Price Lists",
49 "|render": "function() \n{\n _this.grid = this; \n _this.dialog = Pman.Dialog.XtuplePriceList\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}",
50 "|rowdblclick": "function (_self, rowIndex, e)\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}\n"
53 "autoExpandColumn": "ipshead_descrip",
60 "afterselectionchange": "function (_self)\n{\n _this.igrid.footer.onClick('first');\n}"
64 "xtype": "RowSelectionModel",
68 "*prop": "dataSource",
71 "|sortInfo": "{ field : 'ipshead_name', direction: 'ASC' }",
78 "|url": "baseURL + '/Roo/ipshead.php'",
83 "xtype": "JsonReader",
84 "totalProperty": "total",
88 "|fields": "[\n {\n 'name': 'ipshead_id',\n 'type': 'int'\n },\n {\n 'name': 'ipshead_name',\n 'type': 'string'\n },\n {\n 'name': 'ipshead_descrip',\n 'type': 'string'\n },\n {\n 'name': 'ipshead_effective',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'ipshead_expires',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'ipshead_curr_id',\n 'type': 'int'\n },\n {\n 'name': 'ipshead_updated',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'ipshead_curr_id_curr_id',\n 'type': 'int'\n },\n {\n 'name': 'ipshead_curr_id_curr_base',\n 'type': 'int'\n },\n {\n 'name': 'ipshead_curr_id_curr_name',\n 'type': 'string'\n },\n {\n 'name': 'ipshead_curr_id_curr_symbol',\n 'type': 'string'\n },\n {\n 'name': 'ipshead_curr_id_curr_abbr',\n 'type': 'string'\n }\n]"
95 "displayMsg": "Displaying ipshead{0} - {1} of {2}",
96 "emptyMsg": "No ipshead found",
98 "xtype": "PagingToolbar",
108 "click": "function (_self, e)\n{\n new Pman.Download({\n method: 'GET',\n url : baseURL + '/Roo/Ipsiteminfo',\n params : {\n _pricegrid : 1\n }\n });\n}"
110 "text": "Download Price Matrix",
112 "|xns": "Roo.Toolbar"
116 "click": "function (_self, e)\n{\n Pman.Dialog.Image.show(\n {\n _url : baseURL+'/Xtuple/Pricing'\n \n },\n function (data) {\n var msg = [];\n if (data.deleted) {\n msg.push(\"Deleted \" + data.deleted + \" Price(s)\");\n }\n if (data.updated) {\n msg.push(\"Updated \" + data.updated + \" Price(s)\");\n } \n if (data.inserted) {\n msg.push(\"Added \" + data.inserted + \" Price(s)\");\n }\n if (!msg.length) {\n msg.push(\"No data changed\");\n }\n Roo.MessageBox.alert(\"Notice\", msg.join(\"\\n\"));\n\n }\n );\n}"
118 "text": "Upload Price Matrix",
120 "|xns": "Roo.Toolbar"
123 "|xns": "Roo.Toolbar",
129 "cls": "x-btn-text-icon",
130 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
132 "|click": "function()\n{\n if (!_this.dialog) return;\n _this.dialog.show( { id : 0 } , function() {\n _this.grid.footer.onClick('first');\n }); \n}\n"
134 "|xns": "Roo.Toolbar"
138 "cls": "x-btn-text-icon",
139 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
142 "|click": "function()\n{\n Pman.genericDelete(_this, 'ipshead'); \n}\n "
144 "|xns": "Roo.Toolbar"
149 "*prop": "colModel[]",
150 "dataIndex": "ipshead_curr_id_curr_name",
151 "header": "Ipshead curr",
154 "xtype": "ColumnModel",
155 "|renderer": "function(v) { return String.format('{0}', v); }",
159 "*prop": "colModel[]",
160 "dataIndex": "ipshead_name",
161 "header": "Ipshead name",
164 "xtype": "ColumnModel",
165 "|renderer": "function(v) { return String.format('{0}', v); }",
169 "xtype": "ColumnModel",
170 "header": "Ipshead descrip",
172 "dataIndex": "ipshead_descrip",
173 "|renderer": "function(v) { return String.format('{0}', v); }",
175 "*prop": "colModel[]"
178 "xtype": "ColumnModel",
179 "header": "Ipshead effective",
181 "dataIndex": "ipshead_effective",
182 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
184 "*prop": "colModel[]"
187 "*prop": "colModel[]",
188 "dataIndex": "ipshead_expires",
189 "header": "Ipshead expires",
191 "xtype": "ColumnModel",
192 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
196 "xtype": "ColumnModel",
197 "header": "Ipshead updated",
199 "dataIndex": "ipshead_updated",
200 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
202 "*prop": "colModel[]"
210 "|activate": "function() {\n _this.ipanel = this;\n if (_this.igrid) {\n // _this.igrid.footer.onClick('first');\n }\n}"
213 "fitContainer": true,
218 "xtype": "GridPanel",
223 "|render": "function() \n{\n _this.igrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.ipanel.active) {\n //this.footer.onClick('first');\n }\n}",
224 "afteredit": "function (e)\n{\n if(e.value == e.originalValue){\n return false; \n }\n \n var p = _this.grid.getSelectionModel().getSelected();\n \n if(!p || p.data.ipshead_id * 1 < 1){\n Roo.MessageBox.alert('Error','Please select a price list');\n return false; \n }\n \n new Pman.Request({\n url : baseURL +'/Roo/Item',\n method : 'POST',\n marks : 'Posting',\n params : {\n update_ipshead : 1,\n ipshead_id : p.data.ipshead_id,\n item_id : e.record.data.item_id,\n _price : e.value,\n },\n success : function() {\n _this.igrid.footer.onClick('refresh');\n }\n \n });\n \n}",
225 "beforeedit": "function (e)\n{\n if(e.field != 'ipshead_price'){\n return false;\n }\n\n}"
228 "autoExpandColumn": "item_number",
231 "xtype": "EditorGrid",
236 "beforeload": "function (_self, o)\n{\n o.params = o.params || {}\n \n var p = _this.grid.getSelectionModel().getSelected();\n \n if(!p || p.data.ipshead_id * 1 < 1){\n this.removeAll();\n return false;\n }\n \n //o.params.item_active = 1;\n o.params._ipshead_price = 1;\n o.params._ipshead_id = p.data.ipshead_id;\n\n}"
238 "*prop": "dataSource",
241 "|sortInfo": "{ field : 'item_number', direction: 'ASC' }",
246 "xtype": "HttpProxy",
248 "|url": "baseURL + '/Roo/item.php'",
255 "totalProperty": "total",
256 "xtype": "JsonReader",
257 "|fields": "[\n {\n 'name': 'item_id',\n 'type': 'int'\n },\n {\n 'name': 'item_number',\n 'type': 'string'\n }\n]",
268 "xtype": "PagingToolbar",
272 "*prop": "colModel[]",
273 "dataIndex": "item_number",
276 "xtype": "ColumnModel",
277 "|renderer": "function(v) { return String.format('{0}', v); }",
281 "*prop": "colModel[]",
283 "dataIndex": "ipshead_price",
286 "xtype": "ColumnModel",
287 "|renderer": "function(v) { return String.format('{0}', Roo.util.Format.number(v*1,2)); }",
292 "xtype": "GridEditor",
297 "decimalPrecision": 2,
299 "style": "text-align:right",
300 "xtype": "NumberField",