1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.XtupleCurrency = new Roo.XComponent({
6 part : ["Xtuple","Currency"],
7 order : '901-Pman.Tab.XtupleCurrency',
9 parent : 'Pman.Tab.XtupleAccountsTab',
10 name : "Pman.Tab.XtupleCurrency",
18 xtype: 'NestedLayoutPanel',
22 title : "Currency / Rates",
24 xtype: 'BorderLayout',
31 activate : function() {
34 _this.grid.footer.onClick('first');
42 tableName : 'curr_symbol',
43 title : "curr_symbol",
47 autoExpandColumn : 'curr_name',
53 //_this.dialog = Pman.Dialog.FILL_IN
54 if (_this.panel.active) {
55 this.footer.onClick('first');
58 rowdblclick : function (_self, rowIndex, e)
60 if (!_this.dialog) return;
61 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
62 _this.grid.footer.onClick('first');
67 xtype: 'RowSelectionModel',
70 afterselectionchange : function (_self)
72 _this.rgrid.footer.onClick('first');
81 sortInfo : { field : 'curr_name', direction: 'ASC' },
86 url : baseURL + '/Roo/curr_symbol.php'
91 totalProperty : 'total',
108 'name': 'curr_symbol',
119 xtype: 'PagingToolbar',
123 displayMsg : "Displaying curr_symbol{0} - {1} of {2}",
124 emptyMsg : "No curr_symbol found"
138 cls : 'x-btn-text-icon',
139 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
143 if (!_this.dialog) return;
144 _this.dialog.show( { id : 0 } , function() {
145 _this.grid.footer.onClick('first');
154 xtype: 'ColumnModel',
156 dataIndex : 'curr_name',
159 renderer : function(v,x,r) {
161 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
166 xtype: 'ColumnModel',
168 dataIndex : 'curr_symbol',
171 renderer : function(v,x,r) {
173 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
178 xtype: 'ColumnModel',
180 dataIndex : 'curr_abbr',
183 renderer : function(v,x,r) {
185 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
196 activate : function() {
199 _this.rgrid.footer.onClick('first');
207 tableName : 'curr_rate',
216 //_this.dialog = Pman.Dialog.FILL_IN
217 if (_this.rpanel.active) {
218 this.footer.onClick('first');
221 rowdblclick : function (_self, rowIndex, e)
223 if (!_this.dialog) return;
224 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
225 _this.grid.footer.onClick('first');
229 autoExpandColumn : 'curr_rate',
235 beforeload : function (_self, options)
237 var s = _this.grid.selModel.getSelected();
242 options.params.curr_id = s.data.curr_id;
243 options.params._with_base_symbol = 1;
247 sortInfo : { field : 'curr_effective', direction: 'DESC' },
252 url : baseURL + '/Roo/curr_rate.php'
257 totalProperty : 'total',
262 'name': 'curr_rate_id',
278 'name': 'curr_effective',
280 'dateFormat': 'Y-m-d'
283 'name': 'curr_expires',
285 'dateFormat': 'Y-m-d'
291 xtype: 'PagingToolbar',
295 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
296 emptyMsg : "No curr_rate found"
312 if (!_this.dialog) return;
313 _this.dialog.show( { id : 0 } , function() {
314 _this.grid.footer.onClick('first');
318 cls : 'x-btn-text-icon',
319 text : "Get this months rates",
320 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
326 xtype: 'ColumnModel',
328 dataIndex : 'curr_effective',
331 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
334 xtype: 'ColumnModel',
336 dataIndex : 'curr_expires',
339 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
342 xtype: 'ColumnModel',
345 dataIndex : 'curr_rate',
348 renderer : function(v) { return String.format('{0}', v); }
351 xtype: 'ColumnModel',
354 dataIndex : 'curr_rate1',
357 renderer : function(v,x,r) {
359 return String.format('{1}1 = {2}{0}',
360 Roo.util.Format.number(r.data.curr_rate,2),
361 r.data.base_curr_symbol,
362 r.data.curr_id_curr_symbol
368 xtype: 'ColumnModel',
371 dataIndex : 'curr_rate2',
374 renderer : function(v,x,r) {
375 return String.format('{2}1 = {1}{0}',
376 Roo.util.Format.number(1.0/r.data.curr_rate,2),
377 r.data.base_curr_symbol,
378 r.data.curr_id_curr_symbol
387 xtype: 'LayoutRegion',
393 xtype: 'LayoutRegion',