summaryrefslogtreecommitdiff
path: root/sql/modules/Menu.sql
blob: e1f10c7613f3ed6cf04a60fb4800a6099eb38d02 (plain)
  1. CREATE TABLE menu_node (
  2. id serial NOT NULL,
  3. label character varying NOT NULL,
  4. parent integer,
  5. "position" integer NOT NULL
  6. );
  7. ALTER TABLE public.menu_node OWNER TO ledgersmb;
  8. --
  9. -- Name: menu_node_id_seq; Type: SEQUENCE SET; Schema: public; Owner: ledgersmb
  10. --
  11. SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('menu_node', 'id'), 193, true);
  12. --
  13. -- Data for Name: menu_node; Type: TABLE DATA; Schema: public; Owner: ledgersmb
  14. --
  15. COPY menu_node (id, label, parent, "position") FROM stdin;
  16. 0 Top-level \N 0
  17. 1 AR 0 1
  18. 2 Add Transaction 1 1
  19. 3 Sales Invoice 1 2
  20. 4 Reports 1 3
  21. 5 Transactions 4 1
  22. 6 Outstanding 4 2
  23. 7 AR Aging 4 3
  24. 9 Taxable Sales 4 4
  25. 10 Non-Taxable 4 5
  26. 11 Customers 1 4
  27. 12 Add Customer 11 1
  28. 13 Reports 11 2
  29. 14 Search 13 1
  30. 15 History 13 2
  31. 16 Point of Sale 0 2
  32. 17 Sale 16 1
  33. 18 Open 16 2
  34. 19 Receipts 16 3
  35. 20 Close Till 16 4
  36. 21 AP 0 3
  37. 22 Add Transaction 21 1
  38. 23 Vendor Invoice 21 2
  39. 24 Reports 21 3
  40. 25 Transactions 24 1
  41. 26 Outstanding 24 2
  42. 27 AP Aging 24 3
  43. 28 Taxable 24 4
  44. 29 Non-taxable 24 5
  45. 30 Vendors 21 4
  46. 31 Add Vendor 30 1
  47. 32 Reports 30 2
  48. 33 Search 32 1
  49. 34 History 32 2
  50. 35 Cash 0 4
  51. 36 Receipt 35 1
  52. 38 Payment 35 3
  53. 37 Receipts 35 2
  54. 39 Payments 35 4
  55. 40 Transfer 35 5
  56. 42 Receipts 41 1
  57. 43 Payments 41 2
  58. 44 Reconciliation 41 3
  59. 41 Reports 35 7
  60. 45 Reconciliation 35 6
  61. 46 HR 0 5
  62. 47 Employees 46 1
  63. 48 Add Employee 47 1
  64. 49 Search 47 2
  65. 50 Order Entry 0 6
  66. 51 Sales Order 50 1
  67. 52 Purchase Order 50 2
  68. 53 Reports 50 3
  69. 54 Sales Orders 53 1
  70. 55 Purchase Orders 53 2
  71. 57 Sales Orders 56 1
  72. 58 Purchase Orders 56 2
  73. 56 Generate 50 4
  74. 60 Consolidate 50 5
  75. 61 Sales Orders 60 1
  76. 62 Purchase Orders 60 2
  77. 63 Shipping 0 7
  78. 64 Ship 63 1
  79. 65 Receive 63 2
  80. 66 Transfer 63 3
  81. 67 Quotations 0 8
  82. 68 Quotation 67 1
  83. 69 RFQ 67 2
  84. 70 Reports 67 3
  85. 71 Quotations 70 1
  86. 72 RFQs 70 2
  87. 73 General Journal 0 9
  88. 74 Journal Entry 73 1
  89. 75 Adjust Till 73 2
  90. 76 Reports 73 3
  91. 77 Goods and Services 0 10
  92. 78 Add Part 77 1
  93. 79 Add Service 77 2
  94. 80 Add Assembly 77 3
  95. 81 Add Overhead 77 4
  96. 82 Add Group 77 5
  97. 83 Add Pricegroup 77 6
  98. 84 Stock Assembly 77 7
  99. 85 Reports 77 8
  100. 86 All Items 85 1
  101. 87 Parts 85 2
  102. 88 Requirements 85 3
  103. 89 Services 85 4
  104. 90 Labor 85 5
  105. 91 Groups 85 6
  106. 92 Pricegroups 85 7
  107. 93 Assembly 85 8
  108. 94 Components 85 9
  109. 95 Translations 77 9
  110. 96 Description 95 1
  111. 97 Partsgroup 95 2
  112. 98 Projects 0 11
  113. 99 Add Project 98 1
  114. 100 Add Timecard 98 2
  115. 101 Generate 98 3
  116. 102 Sales Orders 101 1
  117. 103 Reports 98 4
  118. 104 Search 103 1
  119. 105 Transactions 103 2
  120. 106 Time Cards 103 3
  121. 107 Translations 98 5
  122. 108 Description 107 1
  123. 109 Reports 0 12
  124. 110 Chart of Accounts 109 1
  125. 111 Trial Balance 109 2
  126. 112 Income Statement 109 3
  127. 113 Balance Sheet 109 4
  128. 114 Inventory Activity 109 5
  129. 115 Recurring Transactions 0 13
  130. 116 Batch Printing 0 14
  131. 117 Sales Invoices 116 1
  132. 118 Sales Orders 116 2
  133. 119 Checks 116 3
  134. 120 Work Orders 116 4
  135. 121 Quotations 116 5
  136. 122 Packing Lists 116 6
  137. 123 Pick Lists 116 7
  138. 124 Purchase Orders 116 8
  139. 125 Bin Lists 116 9
  140. 126 RFQs 116 10
  141. 127 Time Cards 116 11
  142. 128 System 0 15
  143. 129 Audit Control 128 1
  144. 130 Taxes 128 2
  145. 131 Defaults 128 3
  146. 132 Yearend 128 4
  147. 133 Backup 128 5
  148. 134 Send to File 133 1
  149. 135 Send to Email 133 2
  150. 136 Chart of Accounts 128 6
  151. 137 Add Accounts 136 1
  152. 138 List Accounts 136 2
  153. 139 Add GIFI 136 3
  154. 140 List GIFI 136 4
  155. 141 Warehouses 128 7
  156. 142 Add Warehouse 141 1
  157. 143 List Warehouse 141 2
  158. 144 Departments 128 8
  159. 145 Add Department 144 1
  160. 146 List Departments 144 2
  161. 147 Type of Business 128 9
  162. 148 Add Business 147 1
  163. 149 List Businesses 147 2
  164. 150 Language 128 10
  165. 151 Add Language 150 1
  166. 152 List Languages 150 2
  167. 153 SIC 128 11
  168. 154 Add SIC 153 1
  169. 155 List SIC 153 2
  170. 156 HTML Templates 128 12
  171. 157 Income Statement 156 1
  172. 158 Balance Sheet 156 2
  173. 159 Invoice 156 3
  174. 160 AR Transaction 156 4
  175. 161 AP Transaction 156 5
  176. 162 Packing List 156 6
  177. 163 Pick List 156 7
  178. 164 Sales Order 156 8
  179. 165 Work Order 156 9
  180. 166 Purchase Order 156 10
  181. 167 Bin List 156 11
  182. 168 Statement 156 12
  183. 169 Quotation 156 13
  184. 170 RFQ 156 14
  185. 171 Timecard 156 15
  186. 172 LaTeX Templates 128 13
  187. 173 Invoice 172 1
  188. 174 AR Transaction 172 2
  189. 175 AP Transaction 172 3
  190. 176 Packing List 172 4
  191. 177 Pick List 172 5
  192. 178 Sales Order 172 6
  193. 179 Work Order 172 7
  194. 180 Purchase Order 172 8
  195. 181 Bin List 172 9
  196. 182 Statement 172 10
  197. 183 Check 172 11
  198. 184 Receipt 172 12
  199. 185 Quotation 172 13
  200. 186 RFQ 172 14
  201. 187 Timecard 172 15
  202. 188 Text Templates 128 14
  203. 189 POS Invoice 188 1
  204. 190 Stylesheet 0 16
  205. 191 Preferences 0 17
  206. 192 New Window 0 18
  207. 193 Logout 0 19
  208. \.
  209. --
  210. -- Name: menu_node_parent_key; Type: CONSTRAINT; Schema: public; Owner: ledgersmb; Tablespace:
  211. --
  212. ALTER TABLE ONLY menu_node
  213. ADD CONSTRAINT menu_node_parent_key UNIQUE (parent, "position");
  214. --
  215. -- Name: menu_node_pkey; Type: CONSTRAINT; Schema: public; Owner: ledgersmb; Tablespace:
  216. --
  217. ALTER TABLE ONLY menu_node
  218. ADD CONSTRAINT menu_node_pkey PRIMARY KEY (id);
  219. --
  220. -- Name: menu_node_parent_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ledgersmb
  221. --
  222. ALTER TABLE ONLY menu_node
  223. ADD CONSTRAINT menu_node_parent_fkey FOREIGN KEY (parent) REFERENCES menu_node(id);
  224. CREATE TABLE menu_attribute (
  225. node_id integer NOT NULL,
  226. attribute character varying NOT NULL,
  227. value character varying NOT NULL,
  228. id serial NOT NULL
  229. );
  230. --
  231. -- Name: menu_attribute_id_seq; Type: SEQUENCE SET; Schema: public; Owner: ledgersmb
  232. --
  233. SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('menu_attribute', 'id'), 534, true);
  234. --
  235. -- Data for Name: menu_attribute; Type: TABLE DATA; Schema: public; Owner: ledgersmb
  236. --
  237. COPY menu_attribute (node_id, attribute, value, id) FROM stdin;
  238. 1 menu 1 1
  239. 2 module ar.pl 2
  240. 2 action add 3
  241. 3 action add 4
  242. 3 module is.pl 5
  243. 3 type invoice 6
  244. 4 menu 1 7
  245. 5 module ar.pl 8
  246. 5 action search 9
  247. 5 nextsub transactions 10
  248. 6 module ar.pl 12
  249. 6 action search 13
  250. 6 nextsub transactions 14
  251. 7 module rp.pl 15
  252. 7 action report 16
  253. 7 report ar_aging 17
  254. 9 module rp.pl 21
  255. 9 action report 22
  256. 9 report tax_collected 23
  257. 10 module rp.pl 24
  258. 10 action report 25
  259. 10 report nontaxable_sales 26
  260. 11 menu 1 27
  261. 12 module ct.pl 28
  262. 12 action add 29
  263. 12 db customer 30
  264. 13 menu 1 31
  265. 14 module ct.pl 32
  266. 14 db customer 34
  267. 15 module ct.pl 35
  268. 15 action add 36
  269. 15 db customer 37
  270. 14 action history 33
  271. 16 menu 1 38
  272. 17 module ps.pl 39
  273. 17 action add 40
  274. 17 nextsub openinvoices 41
  275. 18 action openinvoices 42
  276. 18 module ps.pl 43
  277. 19 module ps.pl 44
  278. 19 action receipts 46
  279. 20 module rc.pl 47
  280. 20 action till_closing 48
  281. 20 pos true 49
  282. 21 menu 1 50
  283. 22 action add 52
  284. 22 module ap.pl 51
  285. 23 action add 53
  286. 23 type invoice 55
  287. 23 module ir.pl 54
  288. 24 menu 1 56
  289. 25 action search 58
  290. 25 nextsub transactions 59
  291. 25 module ap.pl 57
  292. 26 action search 61
  293. 26 nextsub transactions 62
  294. 26 module ap.pl 60
  295. 27 module rp.pl 63
  296. 27 action report 64
  297. 28 module rp.pl 66
  298. 28 action report 67
  299. 28 report tax_collected 68
  300. 27 report tax_paid 65
  301. 29 module rp.pl 69
  302. 29 action report 70
  303. 29 report report 71
  304. 30 menu 1 72
  305. 31 module ct.pl 73
  306. 31 action add 74
  307. 31 db vendor 75
  308. 32 menu 1 76
  309. 33 module ct.pl 77
  310. 33 action history 79
  311. 33 db vendor 78
  312. 34 module ct.pl 80
  313. 34 action add 81
  314. 34 db vendor 82
  315. 35 menu 1 83
  316. 36 module cp.pl 84
  317. 36 action payment 85
  318. 36 type receipt 86
  319. 37 module cp.pl 87
  320. 38 module cp.pl 90
  321. 38 action payment 91
  322. 37 type receipt 89
  323. 37 action payments 88
  324. 38 type check 92
  325. 39 module cp.pl 93
  326. 39 type check 95
  327. 39 action payments 94
  328. 40 module gl.pl 96
  329. 40 action add 97
  330. 40 transfer 1 98
  331. 41 menu 1 99
  332. 42 module rp.pl 100
  333. 42 action report 101
  334. 42 report receipts 102
  335. 43 module rp.pl 103
  336. 43 action report 104
  337. 43 report payments 105
  338. 45 module rc.pl 106
  339. 45 action reconciliation 107
  340. 44 module rc.pl 108
  341. 44 action reconciliation 109
  342. 44 report 1 110
  343. 46 menu 1 111
  344. 47 menu 1 112
  345. 48 module hr.pl 113
  346. 48 action add 114
  347. 48 db employee 115
  348. 49 module hr.pl 116
  349. 49 db employee 118
  350. 49 action search 117
  351. 50 menu 1 119
  352. 51 module oe.pl 120
  353. 51 action add 121
  354. 51 type sales_order 122
  355. 52 module oe.pl 123
  356. 52 action add 124
  357. 52 type purchase_order 125
  358. 53 menu 1 126
  359. 54 module oe.pl 127
  360. 54 type sales_order 129
  361. 54 action search 128
  362. 55 module oe.pl 130
  363. 55 type purchase_order 132
  364. 55 action search 131
  365. 56 menu 1 133
  366. 57 module oe.pl 134
  367. 57 action search 136
  368. 58 module oe.pl 137
  369. 58 action search 139
  370. 57 type generate_sales_order 135
  371. 58 type generate_purchase_order 138
  372. 61 module oe.pl 140
  373. 61 action search 141
  374. 62 module oe.pl 143
  375. 62 action search 144
  376. 62 type consolidate_purchase_order 145
  377. 61 type consolidate_sales_order 142
  378. 63 menu 1 146
  379. 64 module oe.pl 147
  380. 64 action search 148
  381. 65 module oe.pl 150
  382. 65 action search 151
  383. 65 type consolidate_sales_order 152
  384. 64 type receive_order 149
  385. 66 module oe.pl 153
  386. 66 action search_transfer 154
  387. 67 menu 1 155
  388. 68 module oe.pl 156
  389. 68 action add 157
  390. 69 module oe.pl 159
  391. 69 action add 160
  392. 68 type sales_quotation 158
  393. 69 type request_quotation 161
  394. 70 menu 1 162
  395. 71 module oe.pl 163
  396. 71 type sales_quotation 165
  397. 71 action search 164
  398. 72 module oe.pl 166
  399. 72 action search 168
  400. 72 type request_quotation 167
  401. 73 menu 1 169
  402. 74 module gl.pl 170
  403. 74 action add 171
  404. 75 module gl.pl 172
  405. 75 action add_pos_adjust 174
  406. 75 rowcount 3 175
  407. 75 pos_adjust 1 176
  408. 75 reference Adjusting Till: (Till) Source: (Source) 177
  409. 75 descripton Adjusting till due to data entry error 178
  410. 76 module gl.pl 180
  411. 76 action search 181
  412. 77 menu 1 182
  413. 78 module ic.pl 183
  414. 78 action add 184
  415. 78 item part 185
  416. 79 module ic.pl 186
  417. 79 action add 187
  418. 79 item service 188
  419. 80 module ic.pl 189
  420. 80 action add 190
  421. 81 module ic.pl 192
  422. 81 action add 193
  423. 81 item part 194
  424. 80 item labor 191
  425. 82 action add 195
  426. 82 module pe.pl 196
  427. 83 action add 198
  428. 83 module pe.pl 199
  429. 83 type partsgroup 200
  430. 82 type pricegroup 197
  431. 84 module ic.pl 202
  432. 84 action stock_assembly 203
  433. 85 menu 1 204
  434. 86 module ic.pl 205
  435. 87 action search 206
  436. 86 action search 207
  437. 87 module ic.pl 208
  438. 86 searchitems all 209
  439. 88 module ic.pl 211
  440. 88 action requirements 212
  441. 89 action search 213
  442. 89 module ic.pl 214
  443. 89 searchitems service 215
  444. 87 searchitems part 210
  445. 90 action search 216
  446. 90 module ic.pl 217
  447. 90 searchitems labor 218
  448. 91 module pe.pl 221
  449. 91 type pricegroup 222
  450. 91 action search 220
  451. 92 module pe.pl 224
  452. 92 type partsgroup 225
  453. 92 action search 223
  454. 93 action search 226
  455. 93 module ic.pl 227
  456. 93 searchitems assembly 228
  457. 94 action search 229
  458. 94 module ic.pl 230
  459. 94 searchitems component 231
  460. 95 menu 1 232
  461. 96 module pe.pl 233
  462. 96 action translation 234
  463. 96 translation description 235
  464. 97 module pe.pl 236
  465. 97 action translation 237
  466. 97 translation partsgroup 238
  467. 98 menu 1 239
  468. 99 module pe.pl 240
  469. 99 action add 241
  470. 99 type project 242
  471. 100 module jc.pl 243
  472. 100 action add 244
  473. 99 project project 245
  474. 100 project project 246
  475. 100 type timecard 247
  476. 101 menu 1 248
  477. 102 module pe.pl 249
  478. 102 action project_sales_order 250
  479. 102 menu 1 255
  480. 104 module pe.pl 256
  481. 104 type project 258
  482. 104 action search 257
  483. 105 action report 260
  484. 105 report projects 261
  485. 105 module rp.pl 262
  486. 106 module jc.pl 263
  487. 106 action search 264
  488. 106 type timecard 265
  489. 106 project project 266
  490. 107 menu 1 268
  491. 108 module pe.pl 269
  492. 108 action translation 270
  493. 108 translation project 271
  494. 109 menu 1 272
  495. 110 module ca.pl 273
  496. 110 action chart_of_accounts 274
  497. 111 action report 275
  498. 111 module rp.pl 276
  499. 111 report trial_balance 277
  500. 112 action report 278
  501. 112 module rp.pl 279
  502. 112 report income_statement 280
  503. 113 action report 281
  504. 113 module rp.pl 282
  505. 113 report balance_sheet 283
  506. 114 action report 284
  507. 114 module rp.pl 285
  508. 114 report inv_activity 286
  509. 115 action recurring_transactions 287
  510. 115 module am.pl 288
  511. 116 menu 1 289
  512. 119 module bp.pl 290
  513. 119 action search 291
  514. 119 type check 292
  515. 119 vc vendor 293
  516. 117 module bp.pl 294
  517. 117 action search 295
  518. 117 vc customer 297
  519. 118 module bp.pl 298
  520. 118 action search 299
  521. 118 vc customer 300
  522. 118 type invoice 301
  523. 117 type sales_order 296
  524. 120 module bp.pl 302
  525. 120 action search 303
  526. 120 vc customer 304
  527. 121 module bp.pl 306
  528. 121 action search 307
  529. 121 vc customer 308
  530. 122 module bp.pl 310
  531. 122 action search 311
  532. 122 vc customer 312
  533. 120 type work_order 305
  534. 121 type sales_quotation 309
  535. 122 type packing_list 313
  536. 123 module bp.pl 314
  537. 123 action search 315
  538. 123 vc customer 316
  539. 123 type pick_list 317
  540. 124 module bp.pl 318
  541. 124 action search 319
  542. 124 vc vendor 321
  543. 124 type purchase_order 320
  544. 125 module bp.pl 322
  545. 125 action search 323
  546. 125 vc vendor 325
  547. 126 module bp.pl 326
  548. 126 action search 327
  549. 126 vc vendor 329
  550. 127 module bp.pl 330
  551. 127 action search 331
  552. 127 type timecard 332
  553. 125 type bin_list 324
  554. 126 type request_quotation 328
  555. 127 vc employee 333
  556. 128 menu 1 334
  557. 129 module am.pl 337
  558. 130 module am.pl 338
  559. 131 module am.pl 339
  560. 129 action audit_control 340
  561. 130 taxes audit_control 341
  562. 131 action defaults 342
  563. 130 action taxes 343
  564. 132 module am.pl 346
  565. 132 action yearend 347
  566. 133 menu 1 348
  567. 134 module am.pl 349
  568. 135 module am.pl 350
  569. 134 action backup 351
  570. 135 action backup 352
  571. 134 media file 353
  572. 135 media email 354
  573. 137 module am.pl 355
  574. 138 module am.pl 356
  575. 139 module am.pl 357
  576. 140 module am.pl 358
  577. 137 action add_account 359
  578. 138 action list_account 360
  579. 139 action add_gifi 361
  580. 140 action list_gifi 362
  581. 141 menu 1 363
  582. 142 module am.pl 364
  583. 143 module am.pl 365
  584. 142 action add_warehouse 366
  585. 143 action list_warehouse 367
  586. 145 module am.pl 368
  587. 146 module am.pl 369
  588. 145 action add_department 370
  589. 146 action list_department 371
  590. 147 menu 1 372
  591. 148 module am.pl 373
  592. 149 module am.pl 374
  593. 148 action add_business 375
  594. 149 action list_business 376
  595. 150 menu 1 377
  596. 151 module am.pl 378
  597. 152 module am.pl 379
  598. 151 action add_language 380
  599. 152 action list_language 381
  600. 153 menu 1 382
  601. 154 module am.pl 383
  602. 155 module am.pl 384
  603. 154 action add_sic 385
  604. 155 action list_sic 386
  605. 156 menu 1 387
  606. 157 module am.pl 388
  607. 158 module am.pl 389
  608. 159 module am.pl 390
  609. 160 module am.pl 391
  610. 161 module am.pl 392
  611. 162 module am.pl 393
  612. 163 module am.pl 394
  613. 164 module am.pl 395
  614. 165 module am.pl 396
  615. 166 module am.pl 397
  616. 167 module am.pl 398
  617. 168 module am.pl 399
  618. 169 module am.pl 400
  619. 170 module am.pl 401
  620. 171 module am.pl 402
  621. 157 action list_templates 403
  622. 158 action list_templates 404
  623. 159 action list_templates 405
  624. 160 action list_templates 406
  625. 161 action list_templates 407
  626. 162 action list_templates 408
  627. 163 action list_templates 409
  628. 164 action list_templates 410
  629. 165 action list_templates 411
  630. 166 action list_templates 412
  631. 167 action list_templates 413
  632. 168 action list_templates 414
  633. 169 action list_templates 415
  634. 170 action list_templates 416
  635. 171 action list_templates 417
  636. 157 template income_statement 418
  637. 158 template balance_sheet 419
  638. 159 template invoice 420
  639. 160 template ar_transaction 421
  640. 161 template ap_transaction 422
  641. 162 template packing_list 423
  642. 163 template pick_list 424
  643. 164 template sales_order 425
  644. 165 template work_order 426
  645. 166 template purchase_order 427
  646. 167 template bin_list 428
  647. 168 template statement 429
  648. 169 template quotation 430
  649. 170 template rfq 431
  650. 171 template timecard 432
  651. 157 format HTML 433
  652. 158 format HTML 434
  653. 159 format HTML 435
  654. 160 format HTML 436
  655. 161 format HTML 437
  656. 162 format HTML 438
  657. 163 format HTML 439
  658. 164 format HTML 440
  659. 165 format HTML 441
  660. 166 format HTML 442
  661. 167 format HTML 443
  662. 168 format HTML 444
  663. 169 format HTML 445
  664. 170 format HTML 446
  665. 171 format HTML 447
  666. 172 menu 1 448
  667. 173 action list_templates 449
  668. 174 action list_templates 450
  669. 175 action list_templates 451
  670. 176 action list_templates 452
  671. 177 action list_templates 453
  672. 178 action list_templates 454
  673. 179 action list_templates 455
  674. 180 action list_templates 456
  675. 181 action list_templates 457
  676. 182 action list_templates 458
  677. 183 action list_templates 459
  678. 184 action list_templates 460
  679. 185 action list_templates 461
  680. 186 action list_templates 462
  681. 187 action list_templates 463
  682. 173 module am.pl 464
  683. 174 module am.pl 465
  684. 175 module am.pl 466
  685. 176 module am.pl 467
  686. 177 module am.pl 468
  687. 178 module am.pl 469
  688. 179 module am.pl 470
  689. 180 module am.pl 471
  690. 181 module am.pl 472
  691. 182 module am.pl 473
  692. 183 module am.pl 474
  693. 184 module am.pl 475
  694. 185 module am.pl 476
  695. 186 module am.pl 477
  696. 187 module am.pl 478
  697. 173 format LATEX 479
  698. 174 format LATEX 480
  699. 175 format LATEX 481
  700. 176 format LATEX 482
  701. 177 format LATEX 483
  702. 178 format LATEX 484
  703. 179 format LATEX 485
  704. 180 format LATEX 486
  705. 181 format LATEX 487
  706. 182 format LATEX 488
  707. 183 format LATEX 489
  708. 184 format LATEX 490
  709. 185 format LATEX 491
  710. 186 format LATEX 492
  711. 187 format LATEX 493
  712. 173 template invoice 506
  713. 174 template ar_transaction 507
  714. 175 template ap_transaction 508
  715. 176 template packing_list 509
  716. 177 template pick_list 510
  717. 178 template sales_order 511
  718. 179 template work_order 512
  719. 180 template purchase_order 513
  720. 181 template bin_list 514
  721. 182 template statement 515
  722. 185 template quotation 518
  723. 186 template rfq 519
  724. 187 template timecard 520
  725. 183 template check 516
  726. 184 template receipt 517
  727. 188 menu 1 521
  728. 189 module am.pl 522
  729. 189 action list_templates 523
  730. 189 template pos_invoice 524
  731. 189 format TEXT 525
  732. 190 action display_stylesheet 526
  733. 190 module am.pl 527
  734. 191 module am.pl 528
  735. 191 action config 529
  736. 193 module login.pl 532
  737. 193 action logout 533
  738. 193 target _top 534
  739. 192 menu 1 530
  740. 192 new 1 531
  741. \.
  742. --
  743. -- Name: menu_attribute_id_key; Type: CONSTRAINT; Schema: public; Owner: ledgersmb; Tablespace:
  744. --
  745. ALTER TABLE ONLY menu_attribute
  746. ADD CONSTRAINT menu_attribute_id_key UNIQUE (id);
  747. --
  748. -- Name: menu_attribute_pkey; Type: CONSTRAINT; Schema: public; Owner: ledgersmb; Tablespace:
  749. --
  750. ALTER TABLE ONLY menu_attribute
  751. ADD CONSTRAINT menu_attribute_pkey PRIMARY KEY (node_id, attribute);
  752. --
  753. -- Name: menu_attribute_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ledgersmb
  754. --
  755. ALTER TABLE ONLY menu_attribute
  756. ADD CONSTRAINT menu_attribute_node_id_fkey FOREIGN KEY (node_id) REFERENCES menu_node(id);
  757. --
  758. -- PostgreSQL database dump complete
  759. --
  760. --
  761. CREATE TABLE menu_acl (
  762. id serial NOT NULL,
  763. role_name character varying,
  764. acl_type character varying,
  765. node_id integer,
  766. CONSTRAINT menu_acl_acl_type_check CHECK ((((acl_type)::text = 'allow'::text) OR ((acl_type)::text = 'deny'::text)))
  767. );
  768. ALTER TABLE ONLY menu_acl
  769. ADD CONSTRAINT menu_acl_pkey PRIMARY KEY (id);
  770. ALTER TABLE ONLY menu_acl
  771. ADD CONSTRAINT menu_acl_node_id_fkey FOREIGN KEY (node_id) REFERENCES menu_node(id);
  772. --
  773. -- PostgreSQL database dump complete
  774. --
  775. CREATE TYPE menu_item AS (
  776. position int,
  777. id int,
  778. level int,
  779. label varchar,
  780. path varchar,
  781. args varchar[]
  782. );
  783. CREATE OR REPLACE FUNCTION menu_generate() RETURNS SETOF menu_item AS
  784. $$
  785. DECLARE
  786. item menu_item;
  787. arg menu_attribute%ROWTYPE;
  788. BEGIN
  789. FOR item IN
  790. SELECT n.position, n.id, c.level, n.label, c.path, '{}'
  791. FROM connectby('menu_node', 'id', 'parent', 'position', '0',
  792. 0, ',')
  793. c(id integer, parent integer, "level" integer,
  794. path text, list_order integer)
  795. JOIN menu_node n USING(id)
  796. LOOP
  797. FOR arg IN
  798. SELECT *
  799. FROM menu_attribute
  800. WHERE node_id = item.id
  801. LOOP
  802. item.args := item.args ||
  803. (arg.attribute || '=' || arg.value)::varchar;
  804. END LOOP;
  805. RETURN NEXT item;
  806. END LOOP;
  807. END;
  808. $$ language plpgsql;
  809. --
  810. -- PostgreSQL database dump
  811. --
  812. CREATE VIEW menu_friendly AS
  813. SELECT t."level", t.path, t.list_order, (repeat(' '::text, (2 * t."level")) || (n.label)::text) AS label, n.id, n."position" FROM (connectby('menu_node'::text, 'id'::text, 'parent'::text, 'position'::text, '0'::text, 0, ','::text) t(id integer, parent integer, "level" integer, path text, list_order integer) JOIN menu_node n USING (id));
  814. ALTER TABLE public.menu_friendly OWNER TO ledgersmb;
  815. --
  816. -- PostgreSQL database dump complete
  817. --