Pman.Tab.XtuplePriceLists.bjs
[Pman.Xtuple] / Pman.Tab.XtuplePriceLists.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Pman.Tab.XtuplePriceLists = new Roo.XComponent({
6     part     :  ["Xtuple","PriceLists"],
7     order    : '001-Pman.Tab.XtuplePriceLists',
8     region   : 'center',
9     parent   : 'Pman.Tab.XtupleManage',
10     name     : "Pman.Tab.XtuplePriceLists",
11     disabled : false, 
12     permname : '', 
13     _tree : function()
14     {
15         var _this = this;
16         var MODULE = this;
17         return {
18             xtype: 'NestedLayoutPanel',
19             xns: Roo,
20             background : true,
21             fitContainer : true,
22             fitToFrame : true,
23             region : 'center',
24             title : "Price List",
25             layout : {
26                 xtype: 'BorderLayout',
27                 xns: Roo,
28                 items : [
29                     {
30                         xtype: 'GridPanel',
31                         xns: Roo,
32                         listeners : {
33                             activate : function() {
34                                 _this.panel = this;
35                                 if (_this.grid) {
36                                     _this.grid.footer.onClick('first');
37                                 }
38                             }
39                         },
40                         background : true,
41                         fitContainer : true,
42                         fitToframe : true,
43                         region : 'center',
44                         tableName : 'ipshead',
45                         title : "Price Lists",
46                         grid : {
47                             xtype: 'Grid',
48                             xns: Roo.grid,
49                             listeners : {
50                                 render : function() 
51                                 {
52                                     _this.grid = this; 
53                                     _this.dialog = Pman.Dialog.XtuplePriceList
54                                     if (_this.panel.active) {
55                                        this.footer.onClick('first');
56                                     }
57                                 },
58                                 rowdblclick : function (_self, rowIndex, e)
59                                 {
60                                     if (!_this.dialog) return;
61                                     _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
62                                         _this.grid.footer.onClick('first');
63                                     }); 
64                                     
65                                 }
66                             },
67                             autoExpandColumn : 'ipshead_descrip',
68                             loadMask : true,
69                             sm : {
70                                 xtype: 'RowSelectionModel',
71                                 xns: Roo.grid,
72                                 singleSelect : true
73                             },
74                             dataSource : {
75                                 xtype: 'Store',
76                                 xns: Roo.data,
77                                 remoteSort : true,
78                                 sortInfo : { field : 'ipshead_name', direction: 'ASC' },
79                                 proxy : {
80                                     xtype: 'HttpProxy',
81                                     xns: Roo.data,
82                                     method : 'GET',
83                                     url : baseURL + '/Roo/ipshead.php'
84                                 },
85                                 reader : {
86                                     xtype: 'JsonReader',
87                                     xns: Roo.data,
88                                     totalProperty : 'total',
89                                     root : 'data',
90                                     id : 'id',
91                                     fields : [
92                                         {
93                                             'name': 'ipshead_id',
94                                             'type': 'int'
95                                         },
96                                         {
97                                             'name': 'ipshead_name',
98                                             'type': 'string'
99                                         },
100                                         {
101                                             'name': 'ipshead_descrip',
102                                             'type': 'string'
103                                         },
104                                         {
105                                             'name': 'ipshead_effective',
106                                             'type': 'date',
107                                             'dateFormat': 'Y-m-d'
108                                         },
109                                         {
110                                             'name': 'ipshead_expires',
111                                             'type': 'date',
112                                             'dateFormat': 'Y-m-d'
113                                         },
114                                         {
115                                             'name': 'ipshead_curr_id',
116                                             'type': 'int'
117                                         },
118                                         {
119                                             'name': 'ipshead_updated',
120                                             'type': 'date',
121                                             'dateFormat': 'Y-m-d'
122                                         },
123                                         {
124                                             'name': 'ipshead_curr_id_curr_id',
125                                             'type': 'int'
126                                         },
127                                         {
128                                             'name': 'ipshead_curr_id_curr_base',
129                                             'type': 'int'
130                                         },
131                                         {
132                                             'name': 'ipshead_curr_id_curr_name',
133                                             'type': 'string'
134                                         },
135                                         {
136                                             'name': 'ipshead_curr_id_curr_symbol',
137                                             'type': 'string'
138                                         },
139                                         {
140                                             'name': 'ipshead_curr_id_curr_abbr',
141                                             'type': 'string'
142                                         }
143                                     ]
144                                 }
145                             },
146                             footer : {
147                                 xtype: 'PagingToolbar',
148                                 xns: Roo,
149                                 displayInfo : true,
150                                 displayMsg : "Displaying ipshead{0} - {1} of {2}",
151                                 emptyMsg : "No ipshead found",
152                                 pageSize : 25
153                             },
154                             toolbar : {
155                                 xtype: 'Toolbar',
156                                 xns: Roo,
157                                 items : [
158                                     {
159                                         xtype: 'Button',
160                                         xns: Roo.Toolbar,
161                                         listeners : {
162                                             click : function (_self, e)
163                                             {
164                                                new Pman.Download({
165                                                     method: 'GET',
166                                                     url : baseURL + '/Roo/Ipsiteminfo',
167                                                     params : {
168                                                         _pricegrid : 1
169                                                     }
170                                                });
171                                             }
172                                         },
173                                         text : "Download Price Matrix"
174                                     },
175                                     {
176                                         xtype: 'Button',
177                                         xns: Roo.Toolbar,
178                                         listeners : {
179                                             click : function (_self, e)
180                                             {
181                                                Pman.Dialog.Image.show(
182                                                    {
183                                                         _url : baseURL+'/Xtuple/Pricing'
184                                                     
185                                                    },
186                                                    function (data) {
187                                                         var msg = [];
188                                                         if (data.deleted) {
189                                                             msg.push("Deleted " + data.deleted + " Price(s)");
190                                                         }
191                                                         if (data.updated) {
192                                                             msg.push("Updated " + data.updated + " Price(s)");
193                                                         }            
194                                                         if (data.inserted) {
195                                                             msg.push("Added " + data.inserted + " Price(s)");
196                                                         }
197                                                         if (!msg.length) {
198                                                             msg.push("No data changed");
199                                                         }
200                                                         Roo.MessageBox.alert("Notice", msg.join("\n"));
201                                             
202                                                    }
203                                                );
204                                             }
205                                         },
206                                         text : "Upload Price Matrix"
207                                     },
208                                     {
209                                         xtype: 'Fill',
210                                         xns: Roo.Toolbar
211                                     },
212                                     {
213                                         xtype: 'Button',
214                                         xns: Roo.Toolbar,
215                                         text : "Add",
216                                         cls : 'x-btn-text-icon',
217                                         icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
218                                         listeners : {
219                                             click : function()
220                                             {
221                                                 if (!_this.dialog) return;
222                                                 _this.dialog.show( { id : 0 } , function() {
223                                                     _this.grid.footer.onClick('first');
224                                                }); 
225                                             }
226                                         }
227                                     },
228                                     {
229                                         xtype: 'Button',
230                                         xns: Roo.Toolbar,
231                                         text : "Delete",
232                                         cls : 'x-btn-text-icon',
233                                         icon : rootURL + '/Pman/templates/images/trash.gif',
234                                         listeners : {
235                                             click : function()
236                                             {
237                                                  Pman.genericDelete(_this, 'ipshead'); 
238                                             }
239                                         }
240                                     }
241                                 ]
242                             },
243                             colModel : [
244                                 {
245                                     xtype: 'ColumnModel',
246                                     xns: Roo.grid,
247                                     dataIndex : 'ipshead_curr_id_curr_name',
248                                     header : 'Ipshead curr',
249                                     sortable : true,
250                                     width : 75,
251                                     renderer : function(v) { return String.format('{0}', v); }
252                                 },
253                                 {
254                                     xtype: 'ColumnModel',
255                                     xns: Roo.grid,
256                                     dataIndex : 'ipshead_name',
257                                     header : 'Ipshead name',
258                                     sortable : true,
259                                     width : 200,
260                                     renderer : function(v) { return String.format('{0}', v); }
261                                 },
262                                 {
263                                     xtype: 'ColumnModel',
264                                     xns: Roo.grid,
265                                     header : 'Ipshead descrip',
266                                     width : 200,
267                                     dataIndex : 'ipshead_descrip',
268                                     renderer : function(v) { return String.format('{0}', v); }
269                                 },
270                                 {
271                                     xtype: 'ColumnModel',
272                                     xns: Roo.grid,
273                                     header : 'Ipshead effective',
274                                     width : 75,
275                                     dataIndex : 'ipshead_effective',
276                                     renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
277                                 },
278                                 {
279                                     xtype: 'ColumnModel',
280                                     xns: Roo.grid,
281                                     dataIndex : 'ipshead_expires',
282                                     header : 'Ipshead expires',
283                                     width : 75,
284                                     renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
285                                 },
286                                 {
287                                     xtype: 'ColumnModel',
288                                     xns: Roo.grid,
289                                     header : 'Ipshead updated',
290                                     width : 75,
291                                     dataIndex : 'ipshead_updated',
292                                     renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
293                                 }
294                             ]
295                         }
296                     },
297                     {
298                         xtype: 'GridPanel',
299                         xns: Roo,
300                         listeners : {
301                             activate : function() {
302                                 _this.ipanel = this;
303                                 if (_this.igrid) {
304                                    // _this.igrid.footer.onClick('first');
305                                 }
306                             }
307                         },
308                         background : true,
309                         fitContainer : true,
310                         fitToframe : true,
311                         region : 'east',
312                         tableName : 'item',
313                         title : "Products",
314                         grid : {
315                             xtype: 'EditorGrid',
316                             xns: Roo.grid,
317                             listeners : {
318                                 render : function() 
319                                 {
320                                     _this.igrid = this; 
321                                     //_this.dialog = Pman.Dialog.FILL_IN
322                                     if (_this.ipanel.active) {
323                                        //this.footer.onClick('first');
324                                     }
325                                 },
326                                 cellclick : function (_self, row, col, e)
327                                 {
328                                      var di = _this.grid.colModel.getDataIndex(col);
329                                      
330                                      var rec = _this.grid.ds.getAt(row);
331                                      
332                                      if(di == 'item_image_filename'){
333                                         if(!rec.data.item_image_id){
334                                             return;
335                                         }
336                                         var u = baseURL;
337                                         if(rec.data.item_image_from_hk){
338                                             u = u.split('/');
339                                             u.pop();
340                                             u = u.join('/') + '/hk.php';
341                                         }
342                                         Pman.download( {
343                                            url: u + '/Images/Download/' + rec.data.item_image_id  + '/' + rec.data.item_image_filename
344                                        });
345                                        return;
346                                      }
347                                      
348                                      if (di == 'item_active') {
349                                      
350                                         var nv = rec.data.item_active ? 0 : 1;
351                                         new Pman.Request({
352                                             mask : 'Saving',
353                                             url : baseURL + '/Roo/Item',
354                                             params : {
355                                                 item_id : rec.data.item_id,
356                                                 item_active : nv
357                                             },
358                                             success : function() {
359                                                 rec.set('item_active', nv);
360                                             }
361                                         });
362                                         return;
363                                         
364                                      
365                                      }
366                                      
367                                      if(di == 'itemsrc_active'){
368                                         if(!rec.data.itemsrc_active){
369                                             Roo.MessageBox.alert('Error','Please edit it on Xtuple tool');
370                                             return;
371                                         }
372                                         if(rec.data.itemsrc_active){
373                                             Roo.MessageBox.confirm("Confirm", "Are you sure this product is no longer purchased",
374                                                 function (res) {
375                                                     if(res!='yes') {
376                                                         return;
377                                                     }
378                                                     rec.commit();
379                                             });
380                                         }
381                                     }
382                                      
383                                      _this.locgrid.footer.onClick('first');
384                                      
385                                      
386                                      
387                                      
388                                 },
389                                 afteredit : function (e)
390                                 {
391                                     
392                                     
393                                     Roo.log(e);
394                                     new Pman.Request({
395                                         url : baseURL +'/Roo/Charass',
396                                         params : {
397                                              charass_char_id_char_name : e.field.replace(/^item_char_/,'').toUpperCase(),
398                                              charass_value : e.value,
399                                              charass_target_type : 'I',
400                                              charass_default : 1,
401                                              charass_target_id : e.record.data.item_id
402                                          },
403                                          method : 'POST'
404                                      });
405                                     
406                                     
407                                     e.record.commit();
408                                     
409                                     
410                                     
411                                 },
412                                 rowdblclick : function (_self, rowIndex, e)
413                                 {
414                                     if (!_this.dialog) return;
415                                     _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
416                                         _this.grid.footer.onClick('first');
417                                     }); 
418                                 }
419                             },
420                             autoExpandColumn : 'item_descrip1',
421                             clicksToEdit : 1,
422                             loadMask : true,
423                             dataSource : {
424                                 xtype: 'Store',
425                                 xns: Roo.data,
426                                 listeners : {
427                                     beforeload : function (_self, o)
428                                     {
429                                         o.params = o.params || {}
430                                         
431                                         var p = _this.grid.getSelectionModel().getSelected();
432                                         
433                                         if(!p || p.ipshead_id * 1 < 1){
434                                             this.ds.removeAll();
435                                             return;
436                                         }
437                                         
438                                         o.params.item_active = 1;
439                                     
440                                     },
441                                     update : function (_self, record, operation)
442                                     {
443                                         if(operation != 'commit'){
444                                             return;
445                                         }
446                                         
447                                         var nv  = record.data.itemsrc_active ? 0 : 1;
448                                         new Pman.Request({
449                                             mask : 'Saving',
450                                             url : baseURL + '/Roo/Itemsrc',
451                                             params : {
452                                                 _update_by_item : 1,
453                                                 item_id : record.data.item_id,
454                                                 itemsrc_active : nv
455                                             },
456                                             success : function(res) {
457                                                 record.set('itemsrc_active', nv);
458                                             }
459                                         });
460                                     }
461                                 },
462                                 remoteSort : true,
463                                 sortInfo : { field : 'item_number', direction: 'ASC' },
464                                 proxy : {
465                                     xtype: 'HttpProxy',
466                                     xns: Roo.data,
467                                     method : 'GET',
468                                     url : baseURL + '/Roo/item.php'
469                                 },
470                                 reader : {
471                                     xtype: 'JsonReader',
472                                     xns: Roo.data,
473                                     totalProperty : 'total',
474                                     root : 'data',
475                                     id : 'id',
476                                     fields : [
477                                         {
478                                             'name': 'item_id',
479                                             'type': 'int'
480                                         },
481                                         {
482                                             'name': 'item_number',
483                                             'type': 'string'
484                                         },
485                                         {
486                                             'name': 'item_descrip1',
487                                             'type': 'string'
488                                         },
489                                         {
490                                             'name': 'item_descrip2',
491                                             'type': 'string'
492                                         },
493                                         {
494                                             'name': 'item_classcode_id',
495                                             'type': 'int'
496                                         },
497                                         {
498                                             'name': 'item_picklist',
499                                             'type': 'int'
500                                         },
501                                         {
502                                             'name': 'item_comments',
503                                             'type': 'string'
504                                         },
505                                         {
506                                             'name': 'item_sold',
507                                             'type': 'int'
508                                         },
509                                         {
510                                             'name': 'item_fractional',
511                                             'type': 'int'
512                                         },
513                                         {
514                                             'name': 'item_active',
515                                             'type': 'int'
516                                         },
517                                         {
518                                             'name': 'item_type',
519                                             'type': 'string'
520                                         },
521                                         {
522                                             'name': 'item_prodweight',
523                                             'type': 'float'
524                                         },
525                                         {
526                                             'name': 'item_packweight',
527                                             'type': 'float'
528                                         },
529                                         {
530                                             'name': 'item_prodcat_id',
531                                             'type': 'int'
532                                         },
533                                         {
534                                             'name': 'item_exclusive',
535                                             'type': 'int'
536                                         },
537                                         {
538                                             'name': 'item_listprice',
539                                             'type': 'float'
540                                         },
541                                         {
542                                             'name': 'item_config',
543                                             'type': 'int'
544                                         },
545                                         {
546                                             'name': 'item_extdescrip',
547                                             'type': 'string'
548                                         },
549                                         {
550                                             'name': 'item_upccode',
551                                             'type': 'string'
552                                         },
553                                         {
554                                             'name': 'item_maxcost',
555                                             'type': 'float'
556                                         },
557                                         {
558                                             'name': 'item_inv_uom_id',
559                                             'type': 'int'
560                                         },
561                                         {
562                                             'name': 'item_price_uom_id',
563                                             'type': 'int'
564                                         },
565                                         {
566                                             'name': 'item_warrdays',
567                                             'type': 'int'
568                                         },
569                                         {
570                                             'name': 'item_freightclass_id',
571                                             'type': 'int'
572                                         },
573                                         {
574                                             'name': 'item_tax_recoverable',
575                                             'type': 'int'
576                                         },
577                                         {
578                                             'name': 'item_price_uom_id_uom_id',
579                                             'type': 'int'
580                                         },
581                                         {
582                                             'name': 'item_price_uom_id_uom_name',
583                                             'type': 'string'
584                                         },
585                                         {
586                                             'name': 'item_price_uom_id_uom_descrip',
587                                             'type': 'string'
588                                         },
589                                         {
590                                             'name': 'item_price_uom_id_uom_item_weight',
591                                             'type': 'int'
592                                         },
593                                         {
594                                             'name': 'item_inv_uom_id_uom_id',
595                                             'type': 'int'
596                                         },
597                                         {
598                                             'name': 'item_inv_uom_id_uom_name',
599                                             'type': 'string'
600                                         },
601                                         {
602                                             'name': 'item_inv_uom_id_uom_descrip',
603                                             'type': 'string'
604                                         },
605                                         {
606                                             'name': 'item_inv_uom_id_uom_item_weight',
607                                             'type': 'int'
608                                         },
609                                         {
610                                             'name': 'item_freightclass_id_freightclass_id',
611                                             'type': 'int'
612                                         },
613                                         {
614                                             'name': 'item_freightclass_id_freightclass_code',
615                                             'type': 'string'
616                                         },
617                                         {
618                                             'name': 'item_freightclass_id_freightclass_descrip',
619                                             'type': 'string'
620                                         },
621                                         {
622                                             'name': 'item_classcode_id_classcode_id',
623                                             'type': 'int'
624                                         },
625                                         {
626                                             'name': 'item_classcode_id_classcode_code',
627                                             'type': 'string'
628                                         },
629                                         {
630                                             'name': 'item_classcode_id_classcode_descrip',
631                                             'type': 'string'
632                                         },
633                                         {
634                                             'name': 'item_classcode_id_classcode_mfg',
635                                             'type': 'int'
636                                         },
637                                         {
638                                             'name': 'item_classcode_id_classcode_creator',
639                                             'type': 'string'
640                                         },
641                                         {
642                                             'name': 'item_classcode_id_classcode_created',
643                                             'type': 'date'
644                                         },
645                                         {
646                                             'name': 'item_classcode_id_classcode_modifier',
647                                             'type': 'string'
648                                         },
649                                         {
650                                             'name': 'item_classcode_id_classcode_modified',
651                                             'type': 'date'
652                                         },
653                                         {
654                                             'name': 'item_classcode_id_classcode_type',
655                                             'type': 'string'
656                                         }
657                                     ]
658                                 }
659                             },
660                             footer : {
661                                 xtype: 'PagingToolbar',
662                                 xns: Roo,
663                                 displayInfo : true,
664                                 displayMsg : "Displaying item{0} - {1} of {2}",
665                                 emptyMsg : "No item found",
666                                 pageSize : 25,
667                                 items : [
668                                     {
669                                         xtype: 'Button',
670                                         xns: Roo.Toolbar,
671                                         listeners : {
672                                             click : function (_self, e)
673                                             {
674                                                new Pman.Download({
675                                                     method: 'GET',
676                                                     url : baseURL + '/Roo/item',
677                                                     params : {
678                                                         _costgrid : 1
679                                                     }
680                                                });
681                                             }
682                                         },
683                                         text : "Download Standard costs"
684                                     },
685                                     {
686                                         xtype: 'Button',
687                                         xns: Roo.Toolbar,
688                                         listeners : {
689                                             click : function (_self, e)
690                                             {
691                                                Pman.Dialog.Image.show(
692                                                    {
693                                                         _url : baseURL+'/Xtuple/Import/Products'
694                                                     
695                                                    },
696                                                    function (data) {
697                                                         var msg = [];
698                                                        
699                                                         if (data.updated) {
700                                                             msg.push("Updated " + data.updated + " Products(s)");
701                                                         }            
702                                                         if (data.inserted) {
703                                                             msg.push("Added " + data.inserted + " Products(s)");
704                                                         }
705                                                         if (data.skipped) {
706                                                             msg.push("Skipped " + data.skipped);
707                                                         }
708                                                         
709                                                         if (!msg.length) {
710                                                             msg.push("No data changed");
711                                                         }
712                                                         Roo.MessageBox.alert("Notice", msg.join("\n"));
713                                             
714                                                    }
715                                                );
716                                             }
717                                         },
718                                         text : "Upload new products and costs"
719                                     },
720                                     {
721                                         xtype: 'Button',
722                                         xns: Roo.Toolbar,
723                                         listeners : {
724                                             click : function (_self, e)
725                                             {
726                                                 
727                                                 var sel = _this.grid.selModel.getSelectedCell();
728                                                 if (!sel) {
729                                                     Roo.MessageBox.alert("Error", "Select a row");
730                                                     return;
731                                                 }
732                                                 
733                                                 var rec = _this.grid.ds.getAt(sel[0]);
734                                                 if(rec.data.item_id * 1 < 1){
735                                                     return;
736                                                 }
737                                                 
738                                                 Pman.Dialog.Image.show({
739                                                         id : rec.data.item_image_id ? rec.data.item_image_id : 0,
740                                                         onid : rec.data.item_id,
741                                                         ontable : 'Item'
742                                                     }, function(data) {
743                                                         if (data) {
744                                                             _this.grid.footer.onClick('first');
745                                                             
746                                                     }
747                                                     
748                                                 });
749                                             }
750                                         },
751                                         text : "Upload an image"
752                                     },
753                                     {
754                                         xtype: 'Button',
755                                         xns: Roo.Toolbar,
756                                         listeners : {
757                                             click : function (_self, e)
758                                             {
759                                               Roo.MessageBox.progress ("Syncing Stock", "Sending");
760                                               
761                                               var offset = 0;
762                                               
763                                                function runSync() {
764                                                    
765                                                    new Pman.Request( {
766                                                         url : baseURL+'/Roo/Item',
767                                                         method : 'GET',
768                                                         params : {
769                                                             _syncFromHK : 1,
770                                                             offset : offset
771                                                         },
772                                                         success : function(res) {
773                                                             Roo.log(res);
774                                                             if (!res.data.total) {
775                                                                 Roo.MessageBox.hide();
776                                                                 return;
777                                                             }
778                                                             offset += res.data.limit;
779                                                             Roo.MessageBox.updateProgress ( offset  / res.data.total, "Done " + offset + '/' + res.data.total);
780                                                             runSync();
781                                                         }
782                                                         
783                                                     
784                                                    });
785                                                }
786                                                runSync();
787                                             }
788                                         },
789                                         text : "Sync Product Data from HK",
790                                         hidden : (function() {
791                                         
792                                             return baseURL.match(/hk\.php$/) ? true : false;
793                                         })()
794                                     }
795                                 ]
796                             },
797                             colModel : [
798                                 {
799                                     xtype: 'ColumnModel',
800                                     xns: Roo.grid,
801                                     dataIndex : 'item_number',
802                                     header : 'Number',
803                                     width : 100,
804                                     renderer : function(v) { return String.format('{0}', v); }
805                                 },
806                                 {
807                                     xtype: 'ColumnModel',
808                                     xns: Roo.grid,
809                                     align : 'right',
810                                     dataIndex : 'item_actcost',
811                                     header : 'Cost',
812                                     width : 75,
813                                     renderer : function(v,x,r) {
814                                     
815                                          return String.format('{0}{1}', r.data.item_curr_name, Roo.util.Format.number(v,2)) ; 
816                                          
817                                      }
818                                 },
819                                 {
820                                     xtype: 'ColumnModel',
821                                     xns: Roo.grid,
822                                     align : 'right',
823                                     dataIndex : 'item_base_cost',
824                                     header : 'Cost (base)',
825                                     width : 75,
826                                     renderer : function(v,x,r) {
827                                     
828                                          return String.format('{0}{1}', r.data.item_base_curr, Roo.util.Format.number(v,2)) ; 
829                                          
830                                      }
831                                 }
832                             ]
833                         }
834                     }
835                 ],
836                 center : {
837                     xtype: 'LayoutRegion',
838                     xns: Roo
839                 },
840                 east : {
841                     xtype: 'LayoutRegion',
842                     xns: Roo,
843                     split : true,
844                     width : 200
845                 }
846             }
847         };
848     }
849 });