1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.XtupleSalesShipment = new Roo.XComponent({
8 part : ["Xtuple", "SalesShipment" ],
9 order : '100-Pman.Tab.XtupleSalesShipment',
11 parent : 'Pman.Tab.XtupleSales',
12 name : "unnamed module",
24 url : baseURL + '/Roo/shiphead.php',
37 'name': 'shiphead_order_id',
41 'name': 'shiphead_number',
45 'name': 'shiphead_notes',
49 'name': 'shiphead_shipped',
53 'name': 'shiphead_shipdate',
57 'name': 'shiphead_sfstatus'
60 totalProperty : 'total',
61 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\"}'
66 sortInfo : { field : 'shiphead_shipdate', direction: 'DESC' },
69 beforeload : function (_self, o)
71 o.params._status = _this.status.getValue();
72 var cust = _this.custSel.getValue();
74 o.params.shiphead_custinfo_cust_id = cust;
77 if (_this.fromDate.getValue()) {
78 o.params['search[fromDate]'] = _this.fromDate.getValue().format('Y-m-d');
80 if (_this.toDate.getValue()) {
81 o.params['search[toDate]'] = _this.toDate.getValue().format('Y-m-d');
93 xtype : 'PagingToolbar',
94 emptyMsg : "No shiphead found",
97 displayMsg : "Displaying shiphead{0} - {1} of {2}",
100 '|xns' : 'Roo.Toolbar',
105 click : function (_self, e)
110 Roo.MessageBox.alert("Notice", "Download should start soon");
126 url : baseURL + '/Roo/custinfo.php',
135 xtype : 'JsonReader',
137 fields : [{"name":"cust_id","type":"int"},"cust_name"],
138 totalProperty : 'total'
143 sortInfo : { direction : 'ASC', field: 'cust_name' },
146 beforeload : function (_self, o){
147 o.params = o.params || {};
158 triggerAction : 'all',
159 fieldLabel : 'cust_name',
160 forceSelection : false,
161 selectOnFocus : true,
163 displayField : 'cust_name',
164 emptyText : "Select custinfo",
165 hiddenName : 'cust_id',
167 valueField : 'cust_id',
175 qtip : "Select Customer",
176 queryParam : 'query[cust_name_begin]',
177 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{cust_name}</b> </div>',
178 loadingText : "Searching...",
180 render : function (_self)
182 _this.custSel = _self;
184 select : function (combo, record, index)
186 (function() { _this.grid.footer.onClick('first'); }).defer(100);
197 xtype : 'SimpleStore',
201 [ 'V' , "Void Only"],
204 fields : [ 'ftype', 'fname'],
209 triggerAction : 'all',
210 fieldLabel : 'Status',
211 displayField : 'fname',
212 hiddenName : 'status',
214 valueField : 'ftype',
223 render : function (_self)
225 _this.status = _self;
227 beforeselect : function (combo, record, index)
229 (function() { _this.grid.footer.onClick('first'); }).defer(100);
238 '|xns' : 'Roo.Toolbar',
249 render : function (_self)
251 _this.fromDate = _self;
253 select : function (combo, date)
255 _this.grid.footer.onClick('first');
260 '|xns' : 'Roo.Toolbar',
271 render : function (_self)
273 _this.toDate = _self;
275 select : function (combo, date)
277 _this.grid.footer.onClick('first');
285 autoExpandColumn : 'shiphead_notes',
289 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\"}',
293 xtype : 'ColumnModel',
297 renderer : function(v) { return String.format('{0}', v); },
299 dataIndex : 'shiphead_order_id_cohead_number',
300 builderCfg : '{\"table\":\"shiphead\",\"column\":\"shiphead_order_id\",\"columnshort\":\"shiphead_order_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"}'
304 xtype : 'ColumnModel',
307 renderer : function(v) { return String.format('{0}', v); },
309 dataIndex : 'shiphead_custinfo_cust_name'
313 xtype : 'ColumnModel',
315 header : 'Shipment#',
317 renderer : function(v) { return String.format('{0}', v); },
319 dataIndex : 'shiphead_number',
320 builderCfg : '{\"table\":\"shiphead\",\"column\":\"shiphead_number\",\"columnshort\":\"shiphead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Shipment#\"}'
324 xtype : 'ColumnModel',
327 renderer : function(v) { return String.format('{0}', v); },
329 builderCfg : '{\"table\":\"shiphead\",\"column\":\"shiphead_notes\",\"columnshort\":\"shiphead_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}',
330 dataIndex : 'shiphead_notes'
334 xtype : 'ColumnModel',
335 header : 'Delivery Note#',
337 renderer : function(v) { return String.format('{0}', v); },
339 dataIndex : 'shiphead_delivery_note'
343 xtype : 'ColumnModel',
346 renderer : function(v,x,r) {
351 if (r.json.shiphead_shipdate.length) {
353 if (r.json.shiphead_shipped) {
365 dataIndex : 'shiphead_shipped',
366 builderCfg : '{\"table\":\"shiphead\",\"column\":\"shiphead_shipped\",\"columnshort\":\"shiphead_shipped\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}'
370 xtype : 'ColumnModel',
374 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
376 dataIndex : 'shiphead_shipdate',
377 builderCfg : '{\"table\":\"shiphead\",\"column\":\"shiphead_shipdate\",\"columnshort\":\"shiphead_shipdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}'
381 rowdblclick : function (_self, rowIndex, e)
383 if (!_this.dialog) return;
385 var d = this.getDataSource().getAt(rowIndex).data;
387 cohead_id : d.shiphead_order_id
390 _this.grid.footer.onClick('refresh');
391 Pman.Tab.XtupleSales.grid.footer.onClick('first');
398 _this.dialog = Pman.Dialog.XtupleSalesOrder;
400 if (_this.panel.active) {
401 this.footer.onClick('first');
415 title : "Fullfillments",
418 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\"}',
419 tableName : 'shiphead',
421 activate : function() {
424 _this.grid.footer.onClick('first');