1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.XtupleJournalEntry = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
38 title : "Create / View Transaction",
42 xtype: 'ContentPanel',
50 actioncomplete : function(_self,action)
52 if (action.type == 'setdata') {
53 //_this.dialog.el.mask("Loading");
54 //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
57 if (action.type == 'load') {
58 _this.dialog.el.unmask();
61 if (action.type =='submit') {
63 _this.dialog.el.unmask();
67 _this.callback.call(_this, _this.form.getValues());
73 rendered : function (form)
80 style : 'margin:10px;',
81 url : baseURL + '/Roo/gltrans.php',
91 fieldLabel : 'Sequence',
92 name : 'gltrans_sequence',
98 fieldLabel : 'Journal No.',
99 name : 'gltrans_journalnumber',
105 fieldLabel : 'Created By',
106 name : 'gltrans_username',
114 labelAlign : 'right',
121 name : 'gltrans_date',
128 fieldLabel : 'Entered',
129 name : 'gltrans_entered',
142 fieldLabel : 'Status',
154 boxLabel : 'Recorded in Bank Reconcile',
155 fieldLabel : ' ',
156 name : 'gltrans_rec',
162 boxLabel : 'Deleted',
163 fieldLabel : 'Deleted',
164 name : 'gltrans_deleted',
178 fieldLabel : 'Source',
179 name : 'gltrans_source',
185 fieldLabel : 'Doc Type',
186 name : 'gltrans_doctype',
192 fieldLabel : 'References',
193 name : 'gltrans_misc_id',
201 fieldLabel : 'Doc No.',
202 name : 'gltrans_docnumber',
213 activate : function() {
216 _this.grid.footer.onClick('first');
224 tableName : 'gltrans',
233 //_this.dialog = Pman.Dialog.FILL_IN
234 if (_this.panel.active) {
235 this.footer.onClick('first');
238 rowdblclick : function (_self, rowIndex, e)
240 if (!_this.dialog) return;
241 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
242 _this.grid.footer.onClick('first');
246 autoExpandColumn : 'gltrans_source',
252 beforeload : function (_self, options)
255 if (!_this.form.findField('gltrans_sequence').getValue()) {
258 options.params.gltrans_sequence = _this.form.findField('gltrans_sequence').getValue();
262 sortInfo : { field : 'gltrans_source', direction: 'ASC' },
267 url : baseURL + '/Roo/gltrans.php'
272 totalProperty : 'total',
277 'name': 'gltrans_id',
281 'name': 'gltrans_exported',
285 'name': 'gltrans_created',
287 'dateFormat': 'Y-m-d'
290 'name': 'gltrans_date',
292 'dateFormat': 'Y-m-d'
295 'name': 'gltrans_sequence',
299 'name': 'gltrans_accnt_id',
303 'name': 'gltrans_source',
307 'name': 'gltrans_docnumber',
311 'name': 'gltrans_misc_id',
315 'name': 'gltrans_amount',
319 'name': 'gltrans_notes',
323 'name': 'gltrans_journalnumber',
327 'name': 'gltrans_posted',
331 'name': 'gltrans_doctype',
335 'name': 'gltrans_rec',
339 'name': 'gltrans_username',
343 'name': 'gltrans_deleted',
350 xtype: 'PagingToolbar',
354 displayMsg : "Displaying gltrans{0} - {1} of {2}",
355 emptyMsg : "No gltrans found"
365 cls : 'x-btn-text-icon',
366 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
370 if (!_this.dialog) return;
371 _this.dialog.show( { id : 0 } , function() {
372 _this.grid.footer.onClick('first');
385 cls : 'x-btn-text-icon',
386 icon : rootURL + '/Pman/templates/images/trash.gif',
390 Pman.genericDelete(_this, 'gltrans');
398 xtype: 'ColumnModel',
403 renderer : function(v) { return String.format('{0}', v); }
406 xtype: 'ColumnModel',
408 dataIndex : 'gltrans_sequence',
409 header : 'Gltrans sequence',
411 renderer : function(v,x,r) {
413 return String.format('{0}', r.data.gltrans_accnt_id_accnt_descript);
417 xtype: 'ColumnModel',
419 header : 'Gltrans amount',
421 dataIndex : 'gltrans_amount',
422 renderer : function(v) { return String.format('{0}', v); }
425 xtype: 'ColumnModel',
427 header : 'Gltrans doctype',
429 dataIndex : 'gltrans_doctype',
430 renderer : function(v) { return String.format('{0}', v); }
433 xtype: 'ColumnModel',
435 header : 'Gltrans rec',
437 dataIndex : 'gltrans_rec',
438 renderer : function(v) { return String.format('{0}', v); }
441 xtype: 'ColumnModel',
443 header : 'Gltrans username',
445 dataIndex : 'gltrans_username',
446 renderer : function(v) { return String.format('{0}', v); }
449 xtype: 'ColumnModel',
451 header : 'Gltrans deleted',
453 dataIndex : 'gltrans_deleted',
454 renderer : function(v) { return String.format('{0}', v); }
461 xtype: 'LayoutRegion',
466 xtype: 'LayoutRegion',
474 click : function (_self, e)
485 click : function (_self, e)
490 _this.dialog.el.mask("Saving");
491 _this.form.doAction("submit");