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',
74 sortInfo : { field : 'curr_name', direction: 'ASC' },
79 url : baseURL + '/Roo/curr_symbol.php'
84 totalProperty : 'total',
101 'name': 'curr_symbol',
112 xtype: 'PagingToolbar',
116 displayMsg : "Displaying curr_symbol{0} - {1} of {2}",
117 emptyMsg : "No curr_symbol found"
131 cls : 'x-btn-text-icon',
132 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
136 if (!_this.dialog) return;
137 _this.dialog.show( { id : 0 } , function() {
138 _this.grid.footer.onClick('first');
147 xtype: 'ColumnModel',
149 dataIndex : 'curr_name',
152 renderer : function(v,x,r) {
154 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
159 xtype: 'ColumnModel',
161 dataIndex : 'curr_symbol',
164 renderer : function(v,x,r) {
166 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
171 xtype: 'ColumnModel',
173 dataIndex : 'curr_abbr',
176 renderer : function(v,x,r) {
178 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
189 activate : function() {
192 _this.rgrid.footer.onClick('first');
200 tableName : 'curr_rate',
209 //_this.dialog = Pman.Dialog.FILL_IN
210 if (_this.rpanel.active) {
211 this.footer.onClick('first');
214 rowdblclick : function (_self, rowIndex, e)
216 if (!_this.dialog) return;
217 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
218 _this.grid.footer.onClick('first');
222 autoExpandColumn : 'curr_rate',
228 beforeload : function (_self, options)
230 var s = _this.grid.selModel.getSelected();
235 options.parms.curr_id = s.data.curr_id;
239 sortInfo : { field : '', direction: 'ASC' },
244 url : baseURL + '/Roo/curr_rate.php'
249 totalProperty : 'total',
254 'name': 'curr_rate_id',
270 'name': 'curr_effective',
272 'dateFormat': 'Y-m-d'
275 'name': 'curr_expires',
277 'dateFormat': 'Y-m-d'
283 xtype: 'PagingToolbar',
287 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
288 emptyMsg : "No curr_rate found"
302 cls : 'x-btn-text-icon',
303 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
307 if (!_this.dialog) return;
308 _this.dialog.show( { id : 0 } , function() {
309 _this.grid.footer.onClick('first');
318 xtype: 'ColumnModel',
320 dataIndex : 'curr_effective',
323 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
326 xtype: 'ColumnModel',
328 dataIndex : 'curr_expires',
331 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
334 xtype: 'ColumnModel',
337 dataIndex : 'curr_rate',
340 renderer : function(v) { return String.format('{0}', v); }
347 xtype: 'LayoutRegion',
353 xtype: 'LayoutRegion',