3 "name": "Pman.Dialog.XtupleSalesProductList",
6 "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleSalesProductList.bjs",
10 "show": "function (_self)\n{\n _this.grid.footer.onClick('first');\n}"
17 "title": "Products List",
19 "xtype": "LayoutDialog",
24 "xtype": "LayoutRegion",
29 "|activate": "function() {\n _this.panel = this;\n \n // if (_this.grid) {\n // _this.grid.footer.onClick('first');\n // }\n}"
36 "title": "Products List",
42 "|render": "function() \n{\n _this.grid = this; \n // if (_this.panel.active) {\n// this.footer.onClick('first');\n // }\n \n}",
43 "rowdblclick": "function (_self, rowIndex, e)\n{\n _this.dialog.hide();\n if(!_this.callback){\n return;\n }\n var s = this.ds.getAt(rowIndex);\n if (s.data.item_id * 1 < 1 ) {\n return;\n }\n \n _this.callback.call(_this,s.data);\n}"
46 "autoExpandColumn": "item_descrip1",
53 "singleSelect": false,
54 "xtype": "RowSelectionModel",
59 "beforeload": "function (_self, o)\n{\n o.params._with_prodcat = 1;\n o.params._with_char = 1;\n if (!_this.data.exclude_itemsrc_vendor) {\n \n o.params._with_itemsrc_active = 1;\n }\n o.params._with_last_purchase_price = 1;\n o.params._with_itemsite = 1;\n o.params._with_image = 1;\n\n if(typeof(_this.data.cohead_cust_id) != 'undefined'){\n o.params.cohead_cust_id = _this.data.cohead_cust_id;\n }\n \n if(typeof(_this.data.cohead_id) != 'undefined'){\n o.params.cohead_id = _this.data.cohead_id;\n }\n \n var s = _this.searchBox.getValue();\n if (s.length) {\n o.params['query[number_or_name]'] = s;\n }\n if (_this.data.exclude_itemsrc_vendor) {\n o.params._exclude_itemsrc_vendor = _this.data.exclude_itemsrc_vendor;\n } \n \n _this.addSelected.show();\n if (!_this.data.multi_select) {\n _this.addSelected.hide();\n }\n \n}"
61 "*prop": "dataSource",
64 "|sortInfo": "{ field : 'item_number', direction: 'ASC' }",
71 "|url": "baseURL + '/Roo/item.php'",
78 "totalProperty": "total",
79 "xtype": "JsonReader",
80 "|fields": "[\n {\n 'name': 'item_id',\n 'type': 'int'\n },\n {\n 'name': 'item_number',\n 'type': 'string'\n },\n {\n 'name': 'item_descrip1',\n 'type': 'string'\n },\n {\n 'name': 'item_descrip2',\n 'type': 'string'\n },\n {\n 'name': 'item_classcode_id',\n 'type': 'int'\n },\n {\n 'name': 'item_picklist',\n 'type': 'int'\n },\n {\n 'name': 'item_comments',\n 'type': 'string'\n },\n {\n 'name': 'item_sold',\n 'type': 'int'\n },\n {\n 'name': 'item_fractional',\n 'type': 'int'\n },\n {\n 'name': 'item_active',\n 'type': 'int'\n },\n {\n 'name': 'item_type',\n 'type': 'string'\n },\n {\n 'name': 'item_prodweight',\n 'type': 'float'\n },\n {\n 'name': 'item_packweight',\n 'type': 'float'\n },\n {\n 'name': 'item_prodcat_id',\n 'type': 'int'\n },\n {\n 'name': 'item_exclusive',\n 'type': 'int'\n },\n {\n 'name': 'item_listprice',\n 'type': 'float'\n },\n {\n 'name': 'item_config',\n 'type': 'int'\n },\n {\n 'name': 'item_extdescrip',\n 'type': 'string'\n },\n {\n 'name': 'item_upccode',\n 'type': 'string'\n },\n {\n 'name': 'item_maxcost',\n 'type': 'float'\n },\n {\n 'name': 'item_inv_uom_id',\n 'type': 'int'\n },\n {\n 'name': 'item_price_uom_id',\n 'type': 'int'\n },\n {\n 'name': 'item_warrdays',\n 'type': 'int'\n },\n {\n 'name': 'item_freightclass_id',\n 'type': 'int'\n },\n {\n 'name': 'item_tax_recoverable',\n 'type': 'int'\n },\n {\n 'name': 'item_price_uom_id_uom_id',\n 'type': 'int'\n },\n {\n 'name': 'item_price_uom_id_uom_name',\n 'type': 'string'\n },\n {\n 'name': 'item_price_uom_id_uom_descrip',\n 'type': 'string'\n },\n {\n 'name': 'item_price_uom_id_uom_item_weight',\n 'type': 'int'\n },\n {\n 'name': 'item_inv_uom_id_uom_id',\n 'type': 'int'\n },\n {\n 'name': 'item_inv_uom_id_uom_name',\n 'type': 'string'\n },\n {\n 'name': 'item_inv_uom_id_uom_descrip',\n 'type': 'string'\n },\n {\n 'name': 'item_inv_uom_id_uom_item_weight',\n 'type': 'int'\n },\n {\n 'name': 'item_freightclass_id_freightclass_id',\n 'type': 'int'\n },\n {\n 'name': 'item_freightclass_id_freightclass_code',\n 'type': 'string'\n },\n {\n 'name': 'item_freightclass_id_freightclass_descrip',\n 'type': 'string'\n },\n {\n 'name': 'item_classcode_id_classcode_id',\n 'type': 'int'\n },\n {\n 'name': 'item_classcode_id_classcode_code',\n 'type': 'string'\n },\n {\n 'name': 'item_classcode_id_classcode_descrip',\n 'type': 'string'\n },\n {\n 'name': 'item_classcode_id_classcode_mfg',\n 'type': 'int'\n },\n {\n 'name': 'item_classcode_id_classcode_creator',\n 'type': 'string'\n },\n {\n 'name': 'item_classcode_id_classcode_created',\n 'type': 'date'\n },\n {\n 'name': 'item_classcode_id_classcode_modifier',\n 'type': 'string'\n },\n {\n 'name': 'item_classcode_id_classcode_modified',\n 'type': 'date'\n },\n {\n 'name': 'item_classcode_id_classcode_type',\n 'type': 'string'\n }\n]",
88 "displayMsg": "Double click to select the item",
89 "emptyMsg": "No item found",
91 "xtype": "PagingToolbar",
101 "specialkey": "function (_self, e)\n{\n _this.grid.footer.onClick('first');\n}",
102 "render": "function (_self)\n{\n _this.searchBox = _self;\n}"
104 "xtype": "TextField",
109 "click": "function (_self, e)\n{\n _this.grid.footer.onClick('first');\n}"
113 "|icon": "rootURL + '/Pman/templates/images/search.gif'",
114 "|xns": "Roo.Toolbar"
118 "click": "function (_self, e)\n{\n _this.searchBox.setValue('');\r\n _this.status_type.setValue('');\r\n _this.grid.footer.onClick('first');\r\n}"
122 "|icon": "rootURL + '/Pman/templates/images/edit-clear.gif'",
123 "|xns": "Roo.Toolbar"
128 "*prop": "colModel[]",
129 "dataIndex": "item_image_id",
132 "xtype": "ColumnModel",
133 "|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/50/{1}/{2}\" height=\"50\">', baseURL, v, r.data.item_image_filename); }",
137 "*prop": "colModel[]",
138 "dataIndex": "item_char_brand",
142 "xtype": "ColumnModel",
143 "|renderer": "function(v) { return String.format('{0}', v); }",
147 "*prop": "colModel[]",
148 "dataIndex": "item_char_productgroup",
149 "header": "Product Group",
151 "xtype": "ColumnModel",
152 "|renderer": "function(v) { return String.format('{0}', v); }",
156 "*prop": "colModel[]",
157 "dataIndex": "item_number",
160 "xtype": "ColumnModel",
161 "|renderer": "function(v) { return String.format('{0}', v); }",
165 "*prop": "colModel[]",
166 "dataIndex": "item_descrip1",
167 "header": "Description",
169 "xtype": "ColumnModel",
170 "|renderer": "function(v) { return String.format('{0}', v); }",
174 "*prop": "colModel[]",
175 "dataIndex": "itemsrc_active",
176 "header": "Purchased",
178 "xtype": "ColumnModel",
179 "|renderer": "function(v) { \n var state = v * 1 > 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
183 "*prop": "colModel[]",
184 "dataIndex": "item_sold",
185 "header": "is Sold?",
187 "xtype": "ColumnModel",
188 "|renderer": "function(v) { \n var state = v * 1 > 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
192 "*prop": "colModel[]",
193 "dataIndex": "item_active",
194 "header": "is Active?",
196 "xtype": "ColumnModel",
197 "|renderer": "function(v) { \n var state = v * 1 > 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
201 "*prop": "colModel[]",
202 "dataIndex": "item_type",
205 "xtype": "ColumnModel",
206 "|renderer": "function(v) { return String.format('{0}', v); }",
210 "*prop": "colModel[]",
211 "dataIndex": "item_prodcat_id_prodcat_code",
212 "header": "Item prodcat",
214 "xtype": "ColumnModel",
215 "|renderer": "function(v) { return String.format('{0}', v); }",
224 "click": "function (_self, e)\n{\n\n if(!_this.callback){\n _this.dialog.hide();\n return;\n }\n var sels = _this.grid.selModel.getSelections();\n if (!sels.length) {\n Roo.MessageBox.alert(\"Error\", \"Select some items\");\n }\n _this.dialog.hide();\n _this.callback.call(_this,sels);\n}",
225 "render": "function (_self)\n{\n _this.addSelected = _self;\n}"
227 "*prop": "buttons[]",
228 "text": "Add Selected",
234 "click": "function (_self, e)\n{\n Pman.Dialog.XtupleItem.show({item_id : 0}, function(){\n _this.grid.footer.onClick('first');\n });\n}"
236 "*prop": "buttons[]",
237 "text": "Create New",
243 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
245 "*prop": "buttons[]",