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');
69 sortInfo : { field : 'curr_name', direction: 'ASC' },
74 url : baseURL + '/Roo/curr_symbol.php'
79 totalProperty : 'total',
96 'name': 'curr_symbol',
107 xtype: 'PagingToolbar',
111 displayMsg : "Displaying curr_symbol{0} - {1} of {2}",
112 emptyMsg : "No curr_symbol found"
126 cls : 'x-btn-text-icon',
127 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
131 if (!_this.dialog) return;
132 _this.dialog.show( { id : 0 } , function() {
133 _this.grid.footer.onClick('first');
142 xtype: 'ColumnModel',
144 dataIndex : 'curr_name',
147 renderer : function(v,x,r) {
149 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
154 xtype: 'ColumnModel',
156 dataIndex : 'curr_symbol',
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_abbr',
171 renderer : function(v,x,r) {
173 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
184 activate : function() {
187 _this.rgrid.footer.onClick('first');
195 tableName : 'curr_rate',
204 //_this.dialog = Pman.Dialog.FILL_IN
205 if (_this.rpanel.active) {
206 this.footer.onClick('first');
209 rowdblclick : function (_self, rowIndex, e)
211 if (!_this.dialog) return;
212 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
213 _this.grid.footer.onClick('first');
217 autoExpandColumn : 'curr_rate',
223 beforeload : function (_self, options)
225 var s = _this.grid.selModel.getSelected();
230 options.parms.curr_id = s.data.curr_id;
234 sortInfo : { field : '', direction: 'ASC' },
239 url : baseURL + '/Roo/curr_rate.php'
244 totalProperty : 'total',
249 'name': 'curr_rate_id',
265 'name': 'curr_effective',
267 'dateFormat': 'Y-m-d'
270 'name': 'curr_expires',
272 'dateFormat': 'Y-m-d'
278 xtype: 'PagingToolbar',
282 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
283 emptyMsg : "No curr_rate found"
297 cls : 'x-btn-text-icon',
298 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
302 if (!_this.dialog) return;
303 _this.dialog.show( { id : 0 } , function() {
304 _this.grid.footer.onClick('first');
313 xtype: 'ColumnModel',
315 dataIndex : 'curr_effective',
318 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
321 xtype: 'ColumnModel',
323 dataIndex : 'curr_expires',
326 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
329 xtype: 'ColumnModel',
332 dataIndex : 'curr_rate',
335 renderer : function(v) { return String.format('{0}', v); }
342 xtype: 'LayoutRegion',
348 xtype: 'LayoutRegion',