Pman.Dialog.XtupleJournalEntry.bjs
[Pman.Xtuple] / Pman.Dialog.XtupleJournalEntry.bjs
1 {
2     "id": "roo-file-528",
3     "name": "Pman.Dialog.XtupleJournalEntry",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleJournalEntry.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 910,
12             "modal": true,
13             "resizable": false,
14             "title": "Create / View  Transaction",
15             "width": 800,
16             "xtype": "LayoutDialog",
17             "|xns": "Roo",
18             "items": [
19                 {
20                     "*prop": "north",
21                     "height": 150,
22                     "xtype": "LayoutRegion",
23                     "|xns": "Roo"
24                 },
25                 {
26                     "|xns": "Roo",
27                     "xtype": "LayoutRegion",
28                     "*prop": "center"
29                 },
30                 {
31                     "region": "north",
32                     "xtype": "ContentPanel",
33                     "|xns": "Roo",
34                     "items": [
35                         {
36                             "listeners": {
37                                 "|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",
38                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
39                             },
40                             "labelAlign": "right",
41                             "method": "POST",
42                             "style": "margin:10px;",
43                             "xtype": "Form",
44                             "|url": "baseURL + '/Roo/gltrans.php'",
45                             "|xns": "Roo.form",
46                             "items": [
47                                 {
48                                     "labelAlign": "right",
49                                     "xtype": "Row",
50                                     "|xns": "Roo.form",
51                                     "items": [
52                                         {
53                                             "fieldLabel": "Sequence",
54                                             "name": "gltrans_sequence",
55                                             "width": 100,
56                                             "xtype": "TextField",
57                                             "|xns": "Roo.form"
58                                         },
59                                         {
60                                             "fieldLabel": "Journal No.",
61                                             "name": "gltrans_journalnumber",
62                                             "width": 75,
63                                             "xtype": "TextField",
64                                             "|xns": "Roo.form"
65                                         },
66                                         {
67                                             "fieldLabel": "Created By",
68                                             "name": "gltrans_username",
69                                             "width": 200,
70                                             "xtype": "TextField",
71                                             "|xns": "Roo.form"
72                                         }
73                                     ]
74                                 },
75                                 {
76                                     "labelAlign": "right",
77                                     "xtype": "Row",
78                                     "|xns": "Roo.form",
79                                     "items": [
80                                         {
81                                             "fieldLabel": "Date",
82                                             "format": "d/M/Y",
83                                             "name": "gltrans_date",
84                                             "useIso": true,
85                                             "width": 100,
86                                             "xtype": "DateField",
87                                             "|xns": "Roo.form"
88                                         },
89                                         {
90                                             "fieldLabel": "Entered",
91                                             "name": "gltrans_entered",
92                                             "width": 150,
93                                             "xtype": "TextField",
94                                             "|xns": "Roo.form"
95                                         }
96                                     ]
97                                 },
98                                 {
99                                     "|xns": "Roo.form",
100                                     "xtype": "Row",
101                                     "items": [
102                                         {
103                                             "boxLabel": "Posted",
104                                             "fieldLabel": "Status",
105                                             "name": "Posted",
106                                             "width": 75,
107                                             "xtype": "Checkbox",
108                                             "|xns": "Roo.form"
109                                         },
110                                         {
111                                             "hideLabels": true,
112                                             "xtype": "Row",
113                                             "|xns": "Roo.form",
114                                             "items": [
115                                                 {
116                                                     "boxLabel": "Recorded in Bank Reconcile",
117                                                     "fieldLabel": " ",
118                                                     "name": "gltrans_rec",
119                                                     "width": 200,
120                                                     "xtype": "Checkbox",
121                                                     "|xns": "Roo.form"
122                                                 },
123                                                 {
124                                                     "boxLabel": "Deleted",
125                                                     "fieldLabel": "Deleted",
126                                                     "name": "gltrans_deleted",
127                                                     "width": 75,
128                                                     "xtype": "Checkbox",
129                                                     "|xns": "Roo.form"
130                                                 }
131                                             ]
132                                         }
133                                     ]
134                                 },
135                                 {
136                                     "|xns": "Roo.form",
137                                     "xtype": "Row",
138                                     "items": [
139                                         {
140                                             "fieldLabel": "Source",
141                                             "name": "gltrans_source",
142                                             "width": 100,
143                                             "xtype": "TextField",
144                                             "|xns": "Roo.form"
145                                         },
146                                         {
147                                             "fieldLabel": "Doc Type",
148                                             "name": "gltrans_doctype",
149                                             "width": 100,
150                                             "xtype": "TextField",
151                                             "|xns": "Roo.form"
152                                         },
153                                         {
154                                             "fieldLabel": "References",
155                                             "name": "gltrans_misc_id",
156                                             "width": 75,
157                                             "xtype": "TextField",
158                                             "|xns": "Roo.form"
159                                         }
160                                     ]
161                                 },
162                                 {
163                                     "fieldLabel": "Doc No.",
164                                     "name": "gltrans_docnumber",
165                                     "width": 400,
166                                     "xtype": "TextField",
167                                     "|xns": "Roo.form"
168                                 }
169                             ]
170                         }
171                     ]
172                 },
173                 {
174                     "|xns": "Roo",
175                     "xtype": "GridPanel",
176                     "title": "gltrans",
177                     "fitToframe": true,
178                     "fitContainer": true,
179                     "tableName": "gltrans",
180                     "background": true,
181                     "region": "center",
182                     "listeners": {
183                         "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
184                     },
185                     "items": [
186                         {
187                             "*prop": "grid",
188                             "xtype": "Grid",
189                             "autoExpandColumn": "gltrans_source",
190                             "loadMask": true,
191                             "listeners": {
192                                 "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
193                                 "|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"
194                             },
195                             "|xns": "Roo.grid",
196                             "items": [
197                                 {
198                                     "*prop": "dataSource",
199                                     "xtype": "Store",
200                                     "remoteSort": true,
201                                     "|sortInfo": "{ field : 'gltrans_source', direction: 'ASC' }",
202                                     "|xns": "Roo.data",
203                                     "items": [
204                                         {
205                                             "*prop": "proxy",
206                                             "xtype": "HttpProxy",
207                                             "method": "GET",
208                                             "|url": "baseURL + '/Roo/gltrans.php'",
209                                             "|xns": "Roo.data"
210                                         },
211                                         {
212                                             "|xns": "Roo.data",
213                                             "xtype": "JsonReader",
214                                             "totalProperty": "total",
215                                             "root": "data",
216                                             "*prop": "reader",
217                                             "id": "id",
218                                             "|fields": "[\n    {\n        'name': 'gltrans_id',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_exported',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_created',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'gltrans_date',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'gltrans_sequence',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_accnt_id',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_source',\n        'type': 'string'\n    },\n    {\n        'name': 'gltrans_docnumber',\n        'type': 'string'\n    },\n    {\n        'name': 'gltrans_misc_id',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_amount',\n        'type': 'float'\n    },\n    {\n        'name': 'gltrans_notes',\n        'type': 'string'\n    },\n    {\n        'name': 'gltrans_journalnumber',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_posted',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_doctype',\n        'type': 'string'\n    },\n    {\n        'name': 'gltrans_rec',\n        'type': 'int'\n    },\n    {\n        'name': 'gltrans_username',\n        'type': 'string'\n    },\n    {\n        'name': 'gltrans_deleted',\n        'type': 'int'\n    }\n]"
219                                         }
220                                     ]
221                                 },
222                                 {
223                                     "*prop": "footer",
224                                     "xtype": "PagingToolbar",
225                                     "pageSize": 25,
226                                     "displayInfo": true,
227                                     "displayMsg": "Displaying gltrans{0} - {1} of {2}",
228                                     "emptyMsg": "No gltrans found",
229                                     "|xns": "Roo"
230                                 },
231                                 {
232                                     "*prop": "toolbar",
233                                     "xtype": "Toolbar",
234                                     "|xns": "Roo",
235                                     "items": [
236                                         {
237                                             "text": "Add",
238                                             "xtype": "Button",
239                                             "cls": "x-btn-text-icon",
240                                             "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
241                                             "listeners": {
242                                                 "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
243                                             },
244                                             "|xns": "Roo.Toolbar"
245                                         },
246                                         {
247                                             "text": "Delete",
248                                             "cls": "x-btn-text-icon",
249                                             "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
250                                             "xtype": "Button",
251                                             "listeners": {
252                                                 "|click": "function()\n{\n     Pman.genericDelete(_this, 'gltrans'); \n}\n        "
253                                             },
254                                             "|xns": "Roo.Toolbar"
255                                         }
256                                     ]
257                                 },
258                                 {
259                                     "xtype": "ColumnModel",
260                                     "header": "Gltrans",
261                                     "width": 75,
262                                     "dataIndex": "gltrans_id",
263                                     "|renderer": "function(v) { return String.format('{0}', v); }",
264                                     "|xns": "Roo.grid",
265                                     "*prop": "colModel[]"
266                                 },
267                                 {
268                                     "xtype": "ColumnModel",
269                                     "header": "Gltrans exported",
270                                     "width": 75,
271                                     "dataIndex": "gltrans_exported",
272                                     "|renderer": "function(v) { return String.format('{0}', v); }",
273                                     "|xns": "Roo.grid",
274                                     "*prop": "colModel[]"
275                                 },
276                                 {
277                                     "xtype": "ColumnModel",
278                                     "header": "Gltrans created",
279                                     "width": 75,
280                                     "dataIndex": "gltrans_created",
281                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
282                                     "|xns": "Roo.grid",
283                                     "*prop": "colModel[]"
284                                 },
285                                 {
286                                     "xtype": "ColumnModel",
287                                     "header": "Gltrans date",
288                                     "width": 75,
289                                     "dataIndex": "gltrans_date",
290                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
291                                     "|xns": "Roo.grid",
292                                     "*prop": "colModel[]"
293                                 },
294                                 {
295                                     "xtype": "ColumnModel",
296                                     "header": "Gltrans sequence",
297                                     "width": 75,
298                                     "dataIndex": "gltrans_sequence",
299                                     "|renderer": "function(v) { return String.format('{0}', v); }",
300                                     "|xns": "Roo.grid",
301                                     "*prop": "colModel[]"
302                                 },
303                                 {
304                                     "xtype": "ColumnModel",
305                                     "header": "Gltrans accnt",
306                                     "width": 75,
307                                     "dataIndex": "gltrans_accnt_id",
308                                     "|renderer": "function(v) { return String.format('{0}', v); }",
309                                     "|xns": "Roo.grid",
310                                     "*prop": "colModel[]"
311                                 },
312                                 {
313                                     "xtype": "ColumnModel",
314                                     "header": "Gltrans source",
315                                     "width": 200,
316                                     "dataIndex": "gltrans_source",
317                                     "|renderer": "function(v) { return String.format('{0}', v); }",
318                                     "|xns": "Roo.grid",
319                                     "*prop": "colModel[]"
320                                 },
321                                 {
322                                     "xtype": "ColumnModel",
323                                     "header": "Gltrans docnumber",
324                                     "width": 200,
325                                     "dataIndex": "gltrans_docnumber",
326                                     "|renderer": "function(v) { return String.format('{0}', v); }",
327                                     "|xns": "Roo.grid",
328                                     "*prop": "colModel[]"
329                                 },
330                                 {
331                                     "xtype": "ColumnModel",
332                                     "header": "Gltrans misc",
333                                     "width": 75,
334                                     "dataIndex": "gltrans_misc_id",
335                                     "|renderer": "function(v) { return String.format('{0}', v); }",
336                                     "|xns": "Roo.grid",
337                                     "*prop": "colModel[]"
338                                 },
339                                 {
340                                     "xtype": "ColumnModel",
341                                     "header": "Gltrans amount",
342                                     "width": 75,
343                                     "dataIndex": "gltrans_amount",
344                                     "|renderer": "function(v) { return String.format('{0}', v); }",
345                                     "|xns": "Roo.grid",
346                                     "*prop": "colModel[]"
347                                 },
348                                 {
349                                     "xtype": "ColumnModel",
350                                     "header": "Gltrans notes",
351                                     "width": 200,
352                                     "dataIndex": "gltrans_notes",
353                                     "|renderer": "function(v) { return String.format('{0}', v); }",
354                                     "|xns": "Roo.grid",
355                                     "*prop": "colModel[]"
356                                 },
357                                 {
358                                     "xtype": "ColumnModel",
359                                     "header": "Gltrans journalnumber",
360                                     "width": 75,
361                                     "dataIndex": "gltrans_journalnumber",
362                                     "|renderer": "function(v) { return String.format('{0}', v); }",
363                                     "|xns": "Roo.grid",
364                                     "*prop": "colModel[]"
365                                 },
366                                 {
367                                     "xtype": "ColumnModel",
368                                     "header": "Gltrans posted",
369                                     "width": 75,
370                                     "dataIndex": "gltrans_posted",
371                                     "|renderer": "function(v) { return String.format('{0}', v); }",
372                                     "|xns": "Roo.grid",
373                                     "*prop": "colModel[]"
374                                 },
375                                 {
376                                     "xtype": "ColumnModel",
377                                     "header": "Gltrans doctype",
378                                     "width": 200,
379                                     "dataIndex": "gltrans_doctype",
380                                     "|renderer": "function(v) { return String.format('{0}', v); }",
381                                     "|xns": "Roo.grid",
382                                     "*prop": "colModel[]"
383                                 },
384                                 {
385                                     "xtype": "ColumnModel",
386                                     "header": "Gltrans rec",
387                                     "width": 75,
388                                     "dataIndex": "gltrans_rec",
389                                     "|renderer": "function(v) { return String.format('{0}', v); }",
390                                     "|xns": "Roo.grid",
391                                     "*prop": "colModel[]"
392                                 },
393                                 {
394                                     "xtype": "ColumnModel",
395                                     "header": "Gltrans username",
396                                     "width": 200,
397                                     "dataIndex": "gltrans_username",
398                                     "|renderer": "function(v) { return String.format('{0}', v); }",
399                                     "|xns": "Roo.grid",
400                                     "*prop": "colModel[]"
401                                 },
402                                 {
403                                     "xtype": "ColumnModel",
404                                     "header": "Gltrans deleted",
405                                     "width": 75,
406                                     "dataIndex": "gltrans_deleted",
407                                     "|renderer": "function(v) { return String.format('{0}', v); }",
408                                     "|xns": "Roo.grid",
409                                     "*prop": "colModel[]"
410                                 }
411                             ]
412                         }
413                     ]
414                 },
415                 {
416                     "listeners": {
417                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
418                     },
419                     "*prop": "buttons[]",
420                     "text": "Cancel",
421                     "xtype": "Button",
422                     "|xns": "Roo"
423                 },
424                 {
425                     "listeners": {
426                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
427                     },
428                     "*prop": "buttons[]",
429                     "text": "Save",
430                     "xtype": "Button",
431                     "|xns": "Roo"
432                 }
433             ]
434         }
435     ],
436     "permname": "",
437     "modOrder": "001"
438 }