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');
156 if (!_this.dialog) return;
157 _this.dialog.show( { id : 0 } , function() {
158 _this.grid.footer.onClick('first');
162 cls : 'x-btn-text-icon',
163 text : "Get this months rates",
164 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
170 xtype: 'ColumnModel',
172 dataIndex : 'curr_name',
175 renderer : function(v,x,r) {
177 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
182 xtype: 'ColumnModel',
184 dataIndex : 'curr_symbol',
187 renderer : function(v,x,r) {
189 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
194 xtype: 'ColumnModel',
196 dataIndex : 'curr_abbr',
199 renderer : function(v,x,r) {
201 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
212 activate : function() {
215 _this.rgrid.footer.onClick('first');
223 tableName : 'curr_rate',
232 //_this.dialog = Pman.Dialog.FILL_IN
233 if (_this.rpanel.active) {
234 this.footer.onClick('first');
237 rowdblclick : function (_self, rowIndex, e)
239 if (!_this.dialog) return;
240 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
241 _this.grid.footer.onClick('first');
245 autoExpandColumn : 'curr_rate',
251 beforeload : function (_self, options)
253 var s = _this.grid.selModel.getSelected();
258 options.params.curr_id = s.data.curr_id;
259 options.params._with_base_symbol = 1;
263 sortInfo : { field : 'curr_effective', direction: 'DESC' },
268 url : baseURL + '/Roo/curr_rate.php'
273 totalProperty : 'total',
278 'name': 'curr_rate_id',
294 'name': 'curr_effective',
296 'dateFormat': 'Y-m-d'
299 'name': 'curr_expires',
301 'dateFormat': 'Y-m-d'
307 xtype: 'PagingToolbar',
311 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
312 emptyMsg : "No curr_rate found"
328 if (!_this.dialog) return;
329 _this.dialog.show( { id : 0 } , function() {
330 _this.grid.footer.onClick('first');
334 cls : 'x-btn-text-icon',
335 text : "Get this months rates",
336 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
342 xtype: 'ColumnModel',
344 dataIndex : 'curr_effective',
347 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
350 xtype: 'ColumnModel',
352 dataIndex : 'curr_expires',
355 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
358 xtype: 'ColumnModel',
361 dataIndex : 'curr_rate',
364 renderer : function(v) { return String.format('{0}', v); }
367 xtype: 'ColumnModel',
370 dataIndex : 'curr_rate1',
373 renderer : function(v,x,r) {
375 return String.format('{1}1 = {2}{0}',
376 Roo.util.Format.number(r.data.curr_rate,2),
377 r.data.base_curr_symbol,
378 r.data.curr_id_curr_symbol
384 xtype: 'ColumnModel',
387 dataIndex : 'curr_rate2',
390 renderer : function(v,x,r) {
391 return String.format('{2}1 = {1}{0}',
392 Roo.util.Format.number(1.0/r.data.curr_rate,2),
393 r.data.base_curr_symbol,
394 r.data.curr_id_curr_symbol
403 xtype: 'LayoutRegion',
409 xtype: 'LayoutRegion',