{ "name" : "Pman.Tab.XtupleItem", "parent" : "Pman.Tab.XtupleManage", "title" : "Pman.Tab.XtupleItem", "path" : "/home/edward/gitlive/Pman.Xtuple/Pman.Tab.XtupleItem.bjs", "permname" : "", "modOrder" : "001", "strings" : { "be53a0541a6d36f6ecb879fa2c584b08" : "Image", "41e902bb1b2db625736ede3bacc41fe0" : "is Sold?", "ce4ee01637f4279d02d0f232459dc9a4" : "Purchased", "1be6f9eb563f3bf85c78b4219bf09de9" : "Brand", "aa554e9e2270df2127bfe9096f1bd9ce" : "Displaying item{0} - {1} of {2}", "ce5bf551379459c1c61d2a204061c455" : "Location", "44ca8ce0e02dee5d520525ac21bcbee9" : "Sync Product from HK (Based on Search)", "068f80c7519d0528fb08e82137a72131" : "Products", "68f43fdcf074903d65da764642a4b968" : "is Active?", "759d259249621c817551c5fe726d5c57" : "itemloc", "89217b1527e14cced20e78111a8f5027" : "Item prodcat", "e924991fc4c883bc237e69efe884d674" : "Download Sales Report", "ee3585dbcb1e8f8826f3403c1e9d898c" : "Rename SKU", "20b4f77bd00b4f63a49ec8e08f3bf6a6" : "Cost", "fe78f3efbfa84d8485d589031596c5b8" : "Pallet", "ec211f7c20af43e742bf2570c3cb84f9" : "Add", "19029645d5286771ac708d1bcd118bf4" : "Displaying itemloc{0} - {1} of {2}", "1243daf593fa297e07ab03bf06d925af" : "Searching...", "99a808d8d16122d70e44bd7f709d30fb" : "Balance", "9a8faafb674c03474827bcb6fcde43a3" : "Search Product", "f1c3ca6cadc4a9f57a08d5f7482a3f83" : "No item found", "d6ea9efa48916e9563d76ddc233ebe2a" : "Sync Product from HK (New Products Only)", "ec53a8c4f07baed5d8825072c89799be" : "Status", "2cfd827c6e37453fe1ddde82a5bd9474" : "No itemloc found", "d8ab3576a67fe0cc175ee77d57d0fd85" : "Pickface", "5bc3fd20294c17c9803942958fd7f26d" : "Show Inactive", "70cd7e06502a63356290711ec3b11223" : "Upload new products and costs", "c6ca371871d835c79c8654b5cd788cc7" : "Product Group", "695dbdb13fad32669a68d8fec8541c7f" : "Download Standard costs", "156567f65fc207d39cadbf045687c521" : "Itemloc qty", "c2f1d503b95bf9f3aa4d775a216c5c73" : "Sync Product Data from HK", "36c454c4130e4444e8410f11d6d998f0" : "Tools - Upload/Download", "b5a7adde1af5c87d7fd797b6245c2a39" : "Description", "7fee866379427143414dd7a72e56414b" : "Report start :", "a9e35d03ee7f31f5bb199379a6d3547a" : "Select Brand", "35be52be39d3efcd0cd2b3721fc3c298" : "Cost (base)", "750587d31c68779e7f615c190a9dc23f" : "Last purchase price", "b2ee912b91d69b435159c7c3f6df7f5f" : "Number", "173cf046739c17fd7c97ec3540d58807" : "(function() { return (new Date()).format('Y') + '-01-01'; })()", "c20ad4d76fe97759aa27a0c99bff6710" : "12" }, "items" : [ { "background" : false, "region" : "center", "title" : "Products", "xtype" : "NestedLayoutPanel", "$ xns" : "Roo", "items" : [ { "xtype" : "BorderLayout", "$ xns" : "Roo", "* prop" : "layout", "items" : [ { "xtype" : "LayoutRegion", "$ xns" : "Roo", "* prop" : "center" }, { "xtype" : "LayoutRegion", "width" : 200, "$ xns" : "Roo", "split" : true, "* prop" : "east" }, { "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "background" : false, "region" : "center", "fitToframe" : true, "title" : "Products", "xtype" : "GridPanel", "fitContainer" : true, "$ xns" : "Roo", "tableName" : "item", "items" : [ { "listeners" : { "cellclick" : "function (_self, row, col, e)\n{\n var di = _this.grid.colModel.getDataIndex(col);\n \n var rec = _this.grid.ds.getAt(row);\n \n \n if (di == 'item_active') {\n \n var nv = rec.data.item_active ? 0 : 1;\n new Pman.Request({\n mask : 'Saving',\n url : baseURL + '/Roo/Item',\n params : {\n item_id : rec.data.item_id,\n item_active : nv\n },\n success : function() {\n rec.set('item_active', nv);\n }\n });\n return;\n \n \n }\n \n if(di == 'itemsrc_active'){\n \n \n \n\n if(rec.data.itemsrc_active * 1){\n Roo.MessageBox.confirm(\"Confirm\", \"Are you sure this product is no longer purchased\",\n function (res) {\n if(res!='yes') {\n return;\n }\n rec.set('itemsrc_active', 0);\n rec.commit();\n });\n return;\n }\n \n Pman.Dialog.XtupleItem.show( { item_id : rec.data.item_id } , function() {\n _this.grid.footer.onClick('first');\n }); \n return;\n \n }\n \n _this.locgrid.footer.onClick('first');\n \n \n \n \n}", "celldblclick" : "function (_self, rowIndex, columnIndex, e)\n{\n var s = _this.grid.ds.getAt(rowIndex);\n \n Pman.Dialog.XtupleItem.show( { item_id : s.data.item_id } , function() {\n _this.grid.footer.onClick('first');\n }); \n}", "|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}", "afteredit" : "function (e)\n{\n \n \n Roo.log(e);\n new Pman.Request({\n url : baseURL +'/Roo/Charass',\n params : {\n charass_char_id_char_name : e.field.replace(/^item_char_/,'').toUpperCase(),\n charass_value : e.value,\n charass_target_type : 'I',\n charass_default : 1,\n charass_target_id : e.record.data.item_id\n },\n method : 'POST'\n });\n \n \n e.record.commit();\n \n \n \n}" }, "autoExpandColumn" : "item_descrip1", "xtype" : "EditorGrid", "loadMask" : true, "clicksToEdit" : 1, "$ xns" : "Roo.grid", "* prop" : "grid", "items" : [ { "listeners" : { "update" : "function (_self, record, operation)\n{\n if(operation != 'commit'){\n return;\n }\n \n var nv = record.data.itemsrc_active ? 0 : 1;\n new Pman.Request({\n mask : 'Saving',\n url : baseURL + '/Roo/Itemsrc',\n params : {\n _update_by_item : 1,\n item_id : record.data.item_id,\n itemsrc_active : nv\n },\n success : function(res) {\n record.set('itemsrc_active', nv);\n }\n });\n}", "beforeload" : "function (_self, o)\n{\n o.params._with_prodcat = 1;\n o.params._with_char = 1;\n o.params._with_itemsrc_active = 1;\n o.params._with_last_purchase_price = 1;\n o.params._with_image = 1;\n var s = _this.search.getValue();\n if (s.length) {\n o.params['query[number_or_name]'] = s;\n }\n if (!_this.active.pressed) {\n o.params.item_active = 1;\n }\n if (_this.brandSel.getValue().length) {\n o.params._with_brand = _this.brandSel.getValue()\n }\n \n o.params._with_stock_balance = 1;\n}", "load" : "function (_self, records, options)\n{\n\n var cm = _this.grid.getColumnModel();\n if(records.length){\n cm.setColumnHeader(cm.getIndexByDataIndex('item_stock_balance'),records[0].data.default_location_name);\n }\n}" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ field : 'item_number', direction: 'ASC' }", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "$ url" : "baseURL + '/Roo/item.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ 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]", "* prop" : "reader", "totalProperty" : "total" } ] }, { "xtype" : "Toolbar", "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "listeners" : { "render" : "function (_self)\n{\n _this.brandSel = _self;\n}", "select" : "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}" }, "alwaysQuery" : true, "listWidth" : 300, "triggerAction" : "all", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "charass_value", "emptyText" : "Select Brand", "minChars" : 2, "xtype" : "ComboBox", "allowBlank" : true, "editable" : true, "width" : 150, "$ xns" : "Roo.form", "qtip" : "Select Brand", "queryParam" : "query[charass_value]", "tpl" : "