{ "name" : "Pman.Tab.XtupleSalesShipment", "parent" : "Pman.Tab.XtupleSales", "title" : "", "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleSalesShipment.bjs", "permname" : "", "modOrder" : "100", "items" : [ { "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "fitToframe" : true, "background" : true, "region" : "center", "xtype" : "GridPanel", "title" : "Fullfillments", "$ xns" : "Roo", "fitContainer" : true, "# builderCfg" : "{\"cols\":[{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_sfstatus\",\"columnshort\":\"shiphead_sfstatus\",\"ctype\":\"bpchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"shiphead_notes\"],\"table\":\"shiphead\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}", "tableName" : "shiphead", "items" : [ { "listeners" : { "|rowdblclick" : "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n \n var d = this.getDataSource().getAt(rowIndex).data;\n _this.dialog.show( {\n cohead_id : d.shiphead_order_id\n \n }, function() {\n _this.grid.footer.onClick('refresh');\n Pman.Tab.XtupleSales.grid.footer.onClick('first');\n }); \n}\n", "|render" : "function() \n{\n _this.grid = this; \n try { \n _this.dialog = Pman.Dialog.XtupleSalesOrder;\n } catch(e) {}\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}" }, "autoExpandColumn" : "shiphead_notes", "xtype" : "Grid", "loadMask" : true, "$ xns" : "Roo.grid", "* prop" : "grid", "# builderCfg" : "{\"cols\":[{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_sfstatus\",\"columnshort\":\"shiphead_sfstatus\",\"ctype\":\"bpchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"shiphead_notes\"],\"table\":\"shiphead\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}", "items" : [ { "listeners" : { "beforeload" : "function (_self, o)\n{\n o.params._status = _this.status.getValue();\n var cust = _this.custSel.getValue();\n if (cust *1) {\n o.params.shiphead_custinfo_cust_id = cust;\n }\n \n if (_this.fromDate.getValue()) {\n o.params['search[fromDate]'] = _this.fromDate.getValue().format('Y-m-d');\n }\n if (_this.toDate.getValue()) {\n o.params['search[toDate]'] = _this.toDate.getValue().format('Y-m-d');\n }\n}" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ field : 'shiphead_shipdate', direction: 'DESC' }", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "$ url" : "baseURL + '/Roo/shiphead.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ fields" : "[\n {\n 'name': 'shiphead_order_id',\n 'type': 'int'\n },\n {\n 'name': 'shiphead_number',\n 'type': 'string'\n },\n {\n 'name': 'shiphead_notes',\n 'type': 'string'\n },\n {\n 'name': 'shiphead_shipped',\n 'type': 'boolean'\n },\n {\n 'name': 'shiphead_shipdate',\n 'type': 'date'\n },\n {\n 'name': 'shiphead_sfstatus'\n }\n]", "* prop" : "reader", "totalProperty" : "total", "# builderCfg" : "{\"cols\":[{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"},{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"shiphead\",\"column\":\"shiphead_sfstatus\",\"columnshort\":\"shiphead_sfstatus\",\"ctype\":\"bpchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"shiphead_notes\"],\"table\":\"shiphead\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}" } ] }, { "pageSize" : 25, "xtype" : "PagingToolbar", "emptyMsg" : "No shiphead found", "$ xns" : "Roo", "displayInfo" : true, "displayMsg" : "Displaying shiphead{0} - {1} of {2}", "* prop" : "footer", "items" : [ { "listeners" : { "click" : "function (_self, e)\n{\n new Pman.Download({\n grid: _this.grid\n });\n Roo.MessageBox.alert(\"Notice\", \"Download should start soon\");\n}" }, "text" : "Download", "xtype" : "Button", "$ xns" : "Roo.Toolbar" } ] }, { "xtype" : "Toolbar", "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "listeners" : { "render" : "function (_self)\n{\n _this.custSel = _self;\n}", "select" : "function (combo, record, index)\n{\n (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}" }, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "cust_name", "forceSelection" : false, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "cust_name", "emptyText" : "Select custinfo", "hiddenName" : "cust_id", "minChars" : 2, "valueField" : "cust_id", "xtype" : "ComboBox", "allowBlank" : true, "typeAhead" : true, "editable" : true, "width" : 300, "$ xns" : "Roo.form", "name" : "cust_name", "qtip" : "Select Customer", "queryParam" : "query[cust_name_begin]", "tpl" : "
{cust_name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'cust_name' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/custinfo.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "cust_id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ fields" : "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "listeners" : { "render" : "function (_self)\n{\n _this.status = _self;\n}", "beforeselect" : "function (combo, record, index)\n{\n (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}" }, "listWidth" : 200, "triggerAction" : "all", "fieldLabel" : "Status", "displayField" : "fname", "hiddenName" : "status", "value" : "S", "valueField" : "ftype", "xtype" : "ComboBox", "allowBlank" : false, "editable" : false, "width" : 100, "$ xns" : "Roo.form", "mode" : "local", "name" : "status", "items" : [ { "xtype" : "SimpleStore", "$ data" : "[ \n [ 'S', \"Shipped\"],\n [ 'R' , \"Reserved\"],\n [ 'V' , \"Void Only\"], \n [ 'A', \"All\"] \n]\n", "$ fields" : "[ 'ftype', 'fname']", "$ xns" : "Roo.data", "* prop" : "store" } ] }, { "text" : "From:", "xtype" : "TextItem", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "render" : "function (_self)\n{\n _this.fromDate = _self;\n}", "select" : "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}" }, "format" : "Y-m-d", "xtype" : "DateField", "$ xns" : "Roo.form" }, { "text" : " To:", "xtype" : "TextItem", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "render" : "function (_self)\n{\n _this.toDate = _self;\n}", "select" : "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}" }, "format" : "Y-m-d", "xtype" : "DateField", "$ xns" : "Roo.form" } ] }, { "xtype" : "ColumnModel", "sortable" : true, "header" : "Order#", "width" : 75, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "shiphead_order_id_cohead_number", "# builderCfg" : "{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"}" }, { "xtype" : "ColumnModel", "header" : "Customer", "width" : 200, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "shiphead_custinfo_cust_name" }, { "xtype" : "ColumnModel", "sortable" : true, "header" : "Shipment#", "width" : 200, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "shiphead_number", "# builderCfg" : "{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"}" }, { "xtype" : "ColumnModel", "header" : "notes", "width" : 200, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "# builderCfg" : "{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}", "dataIndex" : "shiphead_notes" }, { "xtype" : "ColumnModel", "header" : "Delivery Note#", "width" : 200, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "shiphead_delivery_note" }, { "xtype" : "ColumnModel", "header" : "shipped", "width" : 75, "$ renderer" : "function(v,x,r) { \n\n\n\n \n if (r.json.shiphead_shipdate.length) {\n \n if (r.json.shiphead_shipped) {\n return \"Confirmed\";\n }\n \n return 'Draft';\n }\n \n return 'VOID';\n \n\n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "shiphead_shipped", "# builderCfg" : "{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}" }, { "xtype" : "ColumnModel", "sortable" : true, "header" : "shipdate", "width" : 75, "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "shiphead_shipdate", "# builderCfg" : "{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}" } ] } ] } ] }