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',
21 title : "Currency / Rates",
23 xtype: 'BorderLayout',
30 activate : function() {
33 _this.grid.footer.onClick('first');
41 tableName : 'curr_symbol',
42 title : "curr_symbol",
46 autoExpandColumn : 'curr_name',
52 //_this.dialog = Pman.Dialog.FILL_IN
53 if (_this.panel.active) {
54 this.footer.onClick('first');
57 rowdblclick : function (_self, rowIndex, e)
59 if (!_this.dialog) return;
60 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
61 _this.grid.footer.onClick('first');
66 xtype: 'RowSelectionModel',
73 sortInfo : { field : 'curr_name', direction: 'ASC' },
78 url : baseURL + '/Roo/curr_symbol.php'
83 totalProperty : 'total',
100 'name': 'curr_symbol',
111 xtype: 'PagingToolbar',
115 displayMsg : "Displaying curr_symbol{0} - {1} of {2}",
116 emptyMsg : "No curr_symbol found"
130 cls : 'x-btn-text-icon',
131 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
135 if (!_this.dialog) return;
136 _this.dialog.show( { id : 0 } , function() {
137 _this.grid.footer.onClick('first');
146 xtype: 'ColumnModel',
148 dataIndex : 'curr_name',
151 renderer : function(v,x,r) {
153 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
158 xtype: 'ColumnModel',
160 dataIndex : 'curr_symbol',
163 renderer : function(v,x,r) {
165 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
170 xtype: 'ColumnModel',
172 dataIndex : 'curr_abbr',
175 renderer : function(v,x,r) {
177 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
188 activate : function() {
191 _this.rgrid.footer.onClick('first');
199 tableName : 'curr_rate',
208 //_this.dialog = Pman.Dialog.FILL_IN
209 if (_this.rpanel.active) {
210 this.footer.onClick('first');
213 rowdblclick : function (_self, rowIndex, e)
215 if (!_this.dialog) return;
216 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
217 _this.grid.footer.onClick('first');
221 autoExpandColumn : 'curr_rate',
227 beforeload : function (_self, options)
229 var s = _this.grid.selModel.getSelected();
234 options.parms.curr_id = s.data.curr_id;
238 sortInfo : { field : '', direction: 'ASC' },
243 url : baseURL + '/Roo/curr_rate.php'
248 totalProperty : 'total',
253 'name': 'curr_rate_id',
269 'name': 'curr_effective',
271 'dateFormat': 'Y-m-d'
274 'name': 'curr_expires',
276 'dateFormat': 'Y-m-d'
282 xtype: 'PagingToolbar',
286 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
287 emptyMsg : "No curr_rate found"
301 cls : 'x-btn-text-icon',
302 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
306 if (!_this.dialog) return;
307 _this.dialog.show( { id : 0 } , function() {
308 _this.grid.footer.onClick('first');
317 xtype: 'ColumnModel',
319 dataIndex : 'curr_effective',
322 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
325 xtype: 'ColumnModel',
327 dataIndex : 'curr_expires',
330 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
333 xtype: 'ColumnModel',
336 dataIndex : 'curr_rate',
339 renderer : function(v) { return String.format('{0}', v); }
346 xtype: 'LayoutRegion',
352 xtype: 'LayoutRegion',