1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.XtupleSalesShipment = new Roo.XComponent({
6 part : ["Xtuple","SalesShipment"],
7 order : '100-Pman.Tab.XtupleSalesShipment',
9 parent : 'Pman.Tab.XtupleSales',
10 name : "unnamed module",
20 title : "Fullfillments",
23 tableName : 'shiphead',
27 activate : function() {
30 _this.grid.footer.onClick('first');
42 _this.dialog = Pman.Dialog.XtupleSalesOrder;
44 if (_this.panel.active) {
45 this.footer.onClick('first');
48 rowdblclick : function (_self, rowIndex, e)
50 if (!_this.dialog) return;
52 var d = this.getDataSource().getAt(rowIndex).data;
54 cohead_id : d.shiphead_order_id
57 _this.grid.footer.onClick('refresh');
58 Pman.Tab.XtupleSales.grid.footer.onClick('first');
62 autoExpandColumn : 'shiphead_notes',
68 beforeload : function (_self, options)
70 options.params._status = _this.status.getValue();
71 var cust = _this.custSel.getValue();
79 sortInfo : { field : 'shiphead_shipdate', direction: 'DESC' },
84 url : baseURL + '/Roo/shiphead.php'
89 totalProperty : 'total',
94 'name': 'shiphead_order_id',
98 'name': 'shiphead_number',
102 'name': 'shiphead_notes',
106 'name': 'shiphead_shipped',
110 'name': 'shiphead_shipdate',
114 'name': 'shiphead_sfstatus'
120 xtype: 'PagingToolbar',
124 displayMsg : "Displaying shiphead{0} - {1} of {2}",
125 emptyMsg : "No shiphead found",
131 click : function (_self, e)
136 Roo.MessageBox.alert("Notice", "Download should start soon");
151 select : function (combo, record, index)
153 (function() { _this.grid.footer.onClick('first'); }).defer(100);
155 render : function (_self)
157 _this.custSel = _self;
161 displayField : 'cust_name',
163 emptyText : "Select custinfo",
164 fieldLabel : 'cust_name',
165 forceSelection : false,
166 hiddenName : 'cust_id',
168 loadingText : "Searching...",
172 qtip : "Select Customer",
173 queryParam : 'query[cust_name]',
174 selectOnFocus : true,
175 tpl : '<div class="x-grid-cell-text x-btn button"><b>{cust_name}</b> </div>',
176 triggerAction : 'all',
178 valueField : 'cust_id',
184 beforeload : function (_self, o){
185 o.params = o.params || {};
190 sortInfo : { direction : 'ASC', field: 'shiphead_shipdate' },
195 url : baseURL + '/Roo/custinfo.php'
202 totalProperty : 'total',
203 fields : [{"name":"cust_id","type":"int"},"cust_name"]
211 render : function (_self)
213 _this.status = _self;
215 beforeselect : function (combo, record, index)
217 (function() { _this.grid.footer.onClick('first'); }).defer(100);
221 displayField : 'fname',
223 fieldLabel : 'Status',
224 hiddenName : 'status',
228 triggerAction : 'all',
230 valueField : 'ftype',
233 xtype: 'SimpleStore',
238 [ 'V' , "Void Only"],
241 fields : [ 'ftype', 'fname']
254 select : function (combo, record, index)
256 (function() { _this.grid.footer.onClick('first'); }).defer(100);
258 render : function (_self)
260 _this.custSel = _self;
264 displayField : 'cust_name',
266 emptyText : "Select custinfo",
267 fieldLabel : 'cust_name',
268 forceSelection : false,
269 hiddenName : 'cust_id',
271 loadingText : "Searching...",
275 qtip : "Select Customer",
276 queryParam : 'query[cust_name]',
277 selectOnFocus : true,
278 tpl : '<div class="x-grid-cell-text x-btn button"><b>{cust_name}</b> </div>',
279 triggerAction : 'all',
281 valueField : 'cust_id',
287 beforeload : function (_self, o){
288 o.params = o.params || {};
293 sortInfo : { direction : 'ASC', field: 'shiphead_shipdate' },
298 url : baseURL + '/Roo/custinfo.php'
305 totalProperty : 'total',
306 fields : [{"name":"cust_id","type":"int"},"cust_name"]
314 render : function (_self)
316 _this.status = _self;
318 beforeselect : function (combo, record, index)
320 (function() { _this.grid.footer.onClick('first'); }).defer(100);
324 displayField : 'fname',
326 fieldLabel : 'Status',
327 hiddenName : 'status',
331 triggerAction : 'all',
333 valueField : 'ftype',
336 xtype: 'SimpleStore',
341 [ 'V' , "Void Only"],
344 fields : [ 'ftype', 'fname']
351 xtype: 'ColumnModel',
353 dataIndex : 'shiphead_order_id_cohead_number',
357 renderer : function(v) { return String.format('{0}', v); }
360 xtype: 'ColumnModel',
362 dataIndex : 'shiphead_custinfo_cust_name',
365 renderer : function(v) { return String.format('{0}', v); }
368 xtype: 'ColumnModel',
370 dataIndex : 'shiphead_number',
371 header : 'Shipment#',
374 renderer : function(v) { return String.format('{0}', v); }
377 xtype: 'ColumnModel',
381 dataIndex : 'shiphead_notes',
382 renderer : function(v) { return String.format('{0}', v); }
385 xtype: 'ColumnModel',
387 dataIndex : 'shiphead_delivery_note',
388 header : 'Delivery Note#',
390 renderer : function(v) { return String.format('{0}', v); }
393 xtype: 'ColumnModel',
395 dataIndex : 'shiphead_shipped',
398 renderer : function(v,x,r) {
403 if (r.json.shiphead_shipdate.length) {
405 if (r.json.shiphead_shipped) {
418 xtype: 'ColumnModel',
420 dataIndex : 'shiphead_shipdate',
424 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }