{
- "id": "roo-file-528",
+ "id": "roo-file-16",
"name": "Pman.Dialog.XtupleJournalEntry",
"parent": "",
"title": "",
- "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleJournalEntry.bjs",
+ "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleJournalEntry.bjs",
"items": [
{
"closable": false,
"items": [
{
"listeners": {
- "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n //_this.dialog.el.mask(\"Loading\");\n //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n return;\n }\n if (action.type == 'load') {\n _this.dialog.el.unmask();\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n",
+ "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n //_this.dialog.el.mask(\"Loading\");\n if (_this.data.gltrans_id) {\n this.load({ method: 'GET', params: { '_id' : _this.data.gltrans_id }});\n return;\n }\n _this.grid.footer.onClick('first'); // clear..\n return;\n }\n if (action.type == 'load') {\n _this.grid.footer.onClick('first');\n return;\n }\n if (action.type =='submit') {\n \n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n",
"|rendered": "function (form)\n{\n _this.form= form;\n}\n"
},
"labelAlign": "right",
{
"fieldLabel": "Sequence",
"name": "gltrans_sequence",
+ "readOnly": true,
"width": 100,
"xtype": "TextField",
"|xns": "Roo.form"
{
"fieldLabel": "Journal No.",
"name": "gltrans_journalnumber",
+ "readOnly": true,
"width": 75,
"xtype": "TextField",
"|xns": "Roo.form"
"|xns": "Roo.form"
},
{
- "fieldLabel": "Entered",
- "name": "gltrans_entered",
+ "fieldLabel": "Created",
+ "name": "gltrans_created",
+ "readOnly": true,
"width": 150,
"xtype": "TextField",
"|xns": "Roo.form"
{
"boxLabel": "Posted",
"fieldLabel": "Status",
- "name": "Posted",
- "width": 75,
+ "name": "gltrans_posted",
+ "width": 100,
"xtype": "Checkbox",
+ "|inputValue": "true",
"|xns": "Roo.form"
},
{
{
"boxLabel": "Recorded in Bank Reconcile",
"fieldLabel": " ",
+ "|inputValue": "true",
"name": "gltrans_rec",
"width": 200,
"xtype": "Checkbox",
{
"boxLabel": "Deleted",
"fieldLabel": "Deleted",
+ "|inputValue": "true",
"name": "gltrans_deleted",
"width": 75,
"xtype": "Checkbox",
{
"fieldLabel": "Source",
"name": "gltrans_source",
+ "readOnly": true,
"width": 100,
"xtype": "TextField",
"|xns": "Roo.form"
{
"fieldLabel": "Doc Type",
"name": "gltrans_doctype",
+ "readOnly": true,
"width": 100,
"xtype": "TextField",
"|xns": "Roo.form"
{
"fieldLabel": "References",
"name": "gltrans_misc_id",
+ "readOnly": true,
"width": 75,
"xtype": "TextField",
"|xns": "Roo.form"
+ },
+ {
+ "text": "Show",
+ "xtype": "Button",
+ "|xns": "Roo"
}
]
},
{
- "fieldLabel": "Doc No.",
- "name": "gltrans_docnumber",
- "width": 400,
- "xtype": "TextField",
- "|xns": "Roo.form"
+ "|xns": "Roo.form",
+ "xtype": "Row",
+ "items": [
+ {
+ "fieldLabel": "Doc No.",
+ "name": "gltrans_docnumber",
+ "width": 100,
+ "xtype": "TextField",
+ "|xns": "Roo.form"
+ },
+ {
+ "fieldLabel": "Notes",
+ "name": "gltrans_notes",
+ "width": 300,
+ "xtype": "TextField",
+ "|xns": "Roo.form"
+ }
+ ]
}
]
}
"|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n _this.grid.footer.onClick('first');\n }); \n}\n"
},
"*prop": "grid",
- "autoExpandColumn": "gltrans_source",
+ "autoExpandColumn": "gltrans_accnt_id",
"loadMask": true,
"xtype": "Grid",
"|xns": "Roo.grid",
},
{
"*prop": "colModel[]",
- "dataIndex": "ID#",
- "header": "Gltrans",
+ "dataIndex": "gltrans_id",
+ "header": "ID#",
"width": 50,
"xtype": "ColumnModel",
"|renderer": "function(v) { return String.format('{0}', v); }",
},
{
"*prop": "colModel[]",
- "dataIndex": "gltrans_sequence",
- "header": "Gltrans sequence",
+ "dataIndex": "gltrans_accnt_id",
+ "header": "Account",
"width": 75,
"xtype": "ColumnModel",
- "|renderer": "function(v,x,r) {\n\n return String.format('{0}', r.data.gltrans_accnt_id_accnt_descript); \n }",
+ "|renderer": "function(v,x,r) {\n\n return String.format('{0}', r.data.gltrans_accnt_id_accnt_descrip); \n }",
"|xns": "Roo.grid"
},
{
- "xtype": "ColumnModel",
- "header": "Gltrans amount",
- "width": 75,
+ "*prop": "colModel[]",
+ "align": "right",
"dataIndex": "gltrans_amount",
- "|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid",
- "*prop": "colModel[]"
- },
- {
+ "header": "Gltrans amount",
+ "width": 100,
"xtype": "ColumnModel",
- "header": "Gltrans deleted",
- "width": 75,
- "dataIndex": "gltrans_deleted",
- "|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid",
- "*prop": "colModel[]"
+ "|renderer": "function(v) { \n\n var vv = Roo.util.Format.number(v,2);\n if (v*1 < 0 ) {\n return '<span style=\"color:red\">' + vv + '</span>';\n }\n return vv; \n}",
+ "|xns": "Roo.grid"
}
]
}
},
{
"listeners": {
- "click": "function (_self, e)\n{\n // do some checks?\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
+ "click": "function (_self, e)\n{\n // do some checks?\n \n if (_this.data.gltrans_id) {\n return;\n }\n\n _this.form.doAction(\"submit\");\n\n}"
},
"*prop": "buttons[]",
"text": "Save",