{ "id": "roo-file-46", "name": "Pman.Tab.XtuplePurchaseStock", "parent": "Pman.Tab.XtuplePurchases", "title": "Pman.Tab.XtuplePurchaseStock", "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtuplePurchaseStock.bjs", "items": [ { "background": true, "title": "Incoming Stock Schedule", "xtype": "NestedLayoutPanel", "|xns": "Roo", "items": [ { "|xns": "Roo", "xtype": "BorderLayout", "*prop": "layout", "items": [ { "|xns": "Roo", "xtype": "LayoutRegion", "*prop": "center" }, { "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": "poitem", "title": "Incoming Stock Schedule", "xtype": "GridPanel", "|xns": "Roo", "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}", "afteredit": "function (e)\n{\n if (e.originalValue == e.value || e.field == 'join_poitem_location_name') {\n return;\n }\n \n e.record.commit();\n \n}", "rowdblclick": "function (_self, rowIndex, e)\r\n{\r\n \n var r = _this.grid.ds.getAt(rowIndex);\r\n Pman.Dialog.XtuplePurchaseOrder.show( { pohead_id : r.data.join_poitem_pohead_id , office : _this.office.getValue()}, function() {\r\n _this.grid.footer.onClick('refresh');\r\n }); \r\n}\r", "beforeedit": "function (e)\n{\n var office = _this.office.getValue();\n var local = baseURL.split('/').pop().split('.').shift();\n \n if(office != local){\n return false;\n }\n}", "rowclick": "function (_self, rowIndex, e)\n{\n\n}" }, "*prop": "grid", "autoExpandColumn": "item_descrip", "clicksToEdit": 1, "loadMask": true, "xtype": "EditorGrid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self, o)\n{\n o.params = o.params || {};\n \n o.params._incoming_stock = 1;\n \n o.params.poitem_status = _this.status.getValue();\n \n o.params._roo_office = _this.office.getValue();\n \n o.params['search[location]'] = _this.location.getValue();\n \n o.params['search[name]'] = _this.searchBox.getValue();\n\n}", "update": "function (_self, record, operation)\n{\n if (operation != 'commit') {\n Roo.log(operation);\n return;\n }\n var params = {\n pohead_id : record.data.join_poitem_pohead_id,\n pohead_comments : record.data.join_poitem_pohead_comments,\n pohead_bg_va : record.data.join_poitem_pohead_bg_va,\n pohead_bg_arrival_est_day : record.data.join_poitem_pohead_bg_arrival_est_day,\n pohead_bg_available_est_day : record.data.join_poitem_pohead_bg_available_est_day,\n pohead_bg_available_latest_day : record.data.join_poitem_pohead_bg_available_latest_day,\n pohead_notes : record.data.join_poitem_pohead_notes\n };\n \n\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/pohead',\n params : params\n });\n \n\n _this.grid.footer.onClick('refresh');\n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'name', direction: 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Xtuple/Roo/Poitem.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'name',\n 'type': 'string'\n },\n {\n 'name': 'type',\n 'type': 'int'\n },\n {\n 'name': 'leader',\n 'type': 'int'\n },\n {\n 'name': 'leader_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_office_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_name',\n 'type': 'string'\n },\n {\n 'name': 'leader_phone',\n 'type': 'string'\n },\n {\n 'name': 'leader_fax',\n 'type': 'string'\n },\n {\n 'name': 'leader_email',\n 'type': 'string'\n },\n {\n 'name': 'leader_company_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_role',\n 'type': 'string'\n },\n {\n 'name': 'leader_active',\n 'type': 'int'\n },\n {\n 'name': 'leader_remarks',\n 'type': 'string'\n },\n {\n 'name': 'leader_passwd',\n 'type': 'string'\n },\n {\n 'name': 'leader_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_lang',\n 'type': 'string'\n },\n {\n 'name': 'leader_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'leader_action_type',\n 'type': 'string'\n },\n {\n 'name': 'leader_project_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_deleted_by',\n 'type': 'int'\n },\n {\n 'name': 'leader_deleted_dt',\n 'type': 'date'\n },\n {\n 'name': 'leader_firstname',\n 'type': 'string'\n },\n {\n 'name': 'leader_lastname',\n 'type': 'string'\n },\n {\n 'name': 'leader_name_facebook',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_blog',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_twitter',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_linkedin',\n 'type': 'string'\n },\n {\n 'name': 'leader_crm_lead_percentage',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_industry_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_updated_action_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_created_action_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_type_id',\n 'type': 'int'\n }\n]" } ] }, { "|xns": "Roo", "xtype": "Toolbar", "*prop": "toolbar", "items": [ { "listeners": { "specialkey": "function (_self, e)\n{\n _this.grid.footer.onClick('first');\n}", "render": "function (_self)\n{\n _this.searchBox = _self;\n}" }, "xtype": "TextField", "|xns": "Roo.form" }, { "listeners": { "click": "function (_self, e)\n{\n _this.grid.footer.onClick('first');\n}" }, "cls": "x-btn-icon", "xtype": "Button", "|icon": "rootURL + '/Pman/templates/images/search.gif'", "|xns": "Roo.Toolbar" }, { "listeners": { "click": "function (_self, e)\n{\n _this.searchBox.setValue('');\r\n _this.grid.footer.onClick('first');\r\n}" }, "cls": "x-btn-icon", "xtype": "Button", "|icon": "rootURL + '/Pman/templates/images/edit-clear.gif'", "|xns": "Roo.Toolbar" }, { "listeners": { "render": "function (_self)\n{\n _this.status = _self;\n}", "select": "function (combo, record, index)\n{\n\n _this.grid.footer.onClick('first');\n}" }, "allowBlank": true, "displayField": "fname", "editable": false, "emptyText": "Select Status", "fieldLabel": "Status", "hiddenName": "poitem_status", "listWidth": 200, "mode": "local", "name": "poitem_status", "tpl": "