summaryrefslogtreecommitdiff
path: root/sql/modules/Menu.sql
blob: 0c6acf157120d785a61c71fc9b55a0c0a2cd928c (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. 60 menu 1 550
  373. 61 module oe.pl 140
  374. 61 action search 141
  375. 62 module oe.pl 143
  376. 62 action search 144
  377. 62 type consolidate_purchase_order 145
  378. 61 type consolidate_sales_order 142
  379. 63 menu 1 146
  380. 64 module oe.pl 147
  381. 64 action search 148
  382. 65 module oe.pl 150
  383. 65 action search 151
  384. 65 type consolidate_sales_order 152
  385. 64 type receive_order 149
  386. 66 module oe.pl 153
  387. 66 action search_transfer 154
  388. 67 menu 1 155
  389. 68 module oe.pl 156
  390. 68 action add 157
  391. 69 module oe.pl 159
  392. 69 action add 160
  393. 68 type sales_quotation 158
  394. 69 type request_quotation 161
  395. 70 menu 1 162
  396. 71 module oe.pl 163
  397. 71 type sales_quotation 165
  398. 71 action search 164
  399. 72 module oe.pl 166
  400. 72 action search 168
  401. 72 type request_quotation 167
  402. 73 menu 1 169
  403. 74 module gl.pl 170
  404. 74 action add 171
  405. 75 module gl.pl 172
  406. 75 action add_pos_adjust 174
  407. 75 rowcount 3 175
  408. 75 pos_adjust 1 176
  409. 75 reference Adjusting Till: (Till) Source: (Source) 177
  410. 75 descripton Adjusting till due to data entry error 178
  411. 76 module gl.pl 180
  412. 76 action search 181
  413. 77 menu 1 182
  414. 78 module ic.pl 183
  415. 78 action add 184
  416. 78 item part 185
  417. 79 module ic.pl 186
  418. 79 action add 187
  419. 79 item service 188
  420. 80 module ic.pl 189
  421. 80 action add 190
  422. 81 module ic.pl 192
  423. 81 action add 193
  424. 81 item part 194
  425. 80 item labor 191
  426. 82 action add 195
  427. 82 module pe.pl 196
  428. 83 action add 198
  429. 83 module pe.pl 199
  430. 83 type partsgroup 200
  431. 82 type pricegroup 197
  432. 84 module ic.pl 202
  433. 84 action stock_assembly 203
  434. 85 menu 1 204
  435. 86 module ic.pl 205
  436. 87 action search 206
  437. 86 action search 207
  438. 87 module ic.pl 208
  439. 86 searchitems all 209
  440. 88 module ic.pl 211
  441. 88 action requirements 212
  442. 89 action search 213
  443. 89 module ic.pl 214
  444. 89 searchitems service 215
  445. 87 searchitems part 210
  446. 90 action search 216
  447. 90 module ic.pl 217
  448. 90 searchitems labor 218
  449. 91 module pe.pl 221
  450. 91 type pricegroup 222
  451. 91 action search 220
  452. 92 module pe.pl 224
  453. 92 type partsgroup 225
  454. 92 action search 223
  455. 93 action search 226
  456. 93 module ic.pl 227
  457. 93 searchitems assembly 228
  458. 94 action search 229
  459. 94 module ic.pl 230
  460. 94 searchitems component 231
  461. 95 menu 1 232
  462. 96 module pe.pl 233
  463. 96 action translation 234
  464. 96 translation description 235
  465. 97 module pe.pl 236
  466. 97 action translation 237
  467. 97 translation partsgroup 238
  468. 98 menu 1 239
  469. 99 module pe.pl 240
  470. 99 action add 241
  471. 99 type project 242
  472. 100 module jc.pl 243
  473. 100 action add 244
  474. 99 project project 245
  475. 100 project project 246
  476. 100 type timecard 247
  477. 101 menu 1 248
  478. 102 module pe.pl 249
  479. 102 action project_sales_order 250
  480. 103 menu 1 551
  481. 104 module pe.pl 256
  482. 104 type project 258
  483. 104 action search 257
  484. 105 action report 260
  485. 105 report projects 261
  486. 105 module rp.pl 262
  487. 106 module jc.pl 263
  488. 106 action search 264
  489. 106 type timecard 265
  490. 106 project project 266
  491. 107 menu 1 268
  492. 108 module pe.pl 269
  493. 108 action translation 270
  494. 108 translation project 271
  495. 109 menu 1 272
  496. 110 module ca.pl 273
  497. 110 action chart_of_accounts 274
  498. 111 action report 275
  499. 111 module rp.pl 276
  500. 111 report trial_balance 277
  501. 112 action report 278
  502. 112 module rp.pl 279
  503. 112 report income_statement 280
  504. 113 action report 281
  505. 113 module rp.pl 282
  506. 113 report balance_sheet 283
  507. 114 action report 284
  508. 114 module rp.pl 285
  509. 114 report inv_activity 286
  510. 115 action recurring_transactions 287
  511. 115 module am.pl 288
  512. 116 menu 1 289
  513. 119 module bp.pl 290
  514. 119 action search 291
  515. 119 type check 292
  516. 119 vc vendor 293
  517. 117 module bp.pl 294
  518. 117 action search 295
  519. 117 vc customer 297
  520. 118 module bp.pl 298
  521. 118 action search 299
  522. 118 vc customer 300
  523. 118 type invoice 301
  524. 117 type sales_order 296
  525. 120 module bp.pl 302
  526. 120 action search 303
  527. 120 vc customer 304
  528. 121 module bp.pl 306
  529. 121 action search 307
  530. 121 vc customer 308
  531. 122 module bp.pl 310
  532. 122 action search 311
  533. 122 vc customer 312
  534. 120 type work_order 305
  535. 121 type sales_quotation 309
  536. 122 type packing_list 313
  537. 123 module bp.pl 314
  538. 123 action search 315
  539. 123 vc customer 316
  540. 123 type pick_list 317
  541. 124 module bp.pl 318
  542. 124 action search 319
  543. 124 vc vendor 321
  544. 124 type purchase_order 320
  545. 125 module bp.pl 322
  546. 125 action search 323
  547. 125 vc vendor 325
  548. 126 module bp.pl 326
  549. 126 action search 327
  550. 126 vc vendor 329
  551. 127 module bp.pl 330
  552. 127 action search 331
  553. 127 type timecard 332
  554. 125 type bin_list 324
  555. 126 type request_quotation 328
  556. 127 vc employee 333
  557. 128 menu 1 334
  558. 129 module am.pl 337
  559. 130 module am.pl 338
  560. 131 module am.pl 339
  561. 129 action audit_control 340
  562. 130 taxes audit_control 341
  563. 131 action defaults 342
  564. 130 action taxes 343
  565. 132 module am.pl 346
  566. 132 action yearend 347
  567. 133 menu 1 348
  568. 134 module am.pl 349
  569. 135 module am.pl 350
  570. 134 action backup 351
  571. 135 action backup 352
  572. 134 media file 353
  573. 135 media email 354
  574. 137 module am.pl 355
  575. 138 module am.pl 356
  576. 139 module am.pl 357
  577. 140 module am.pl 358
  578. 137 action add_account 359
  579. 138 action list_account 360
  580. 139 action add_gifi 361
  581. 140 action list_gifi 362
  582. 141 menu 1 363
  583. 142 module am.pl 364
  584. 143 module am.pl 365
  585. 142 action add_warehouse 366
  586. 143 action list_warehouse 367
  587. 145 module am.pl 368
  588. 146 module am.pl 369
  589. 145 action add_department 370
  590. 146 action list_department 371
  591. 147 menu 1 372
  592. 148 module am.pl 373
  593. 149 module am.pl 374
  594. 148 action add_business 375
  595. 149 action list_business 376
  596. 150 menu 1 377
  597. 151 module am.pl 378
  598. 152 module am.pl 379
  599. 151 action add_language 380
  600. 152 action list_language 381
  601. 153 menu 1 382
  602. 154 module am.pl 383
  603. 155 module am.pl 384
  604. 154 action add_sic 385
  605. 155 action list_sic 386
  606. 156 menu 1 387
  607. 157 module am.pl 388
  608. 158 module am.pl 389
  609. 159 module am.pl 390
  610. 160 module am.pl 391
  611. 161 module am.pl 392
  612. 162 module am.pl 393
  613. 163 module am.pl 394
  614. 164 module am.pl 395
  615. 165 module am.pl 396
  616. 166 module am.pl 397
  617. 167 module am.pl 398
  618. 168 module am.pl 399
  619. 169 module am.pl 400
  620. 170 module am.pl 401
  621. 171 module am.pl 402
  622. 157 action list_templates 403
  623. 158 action list_templates 404
  624. 159 action list_templates 405
  625. 160 action list_templates 406
  626. 161 action list_templates 407
  627. 162 action list_templates 408
  628. 163 action list_templates 409
  629. 164 action list_templates 410
  630. 165 action list_templates 411
  631. 166 action list_templates 412
  632. 167 action list_templates 413
  633. 168 action list_templates 414
  634. 169 action list_templates 415
  635. 170 action list_templates 416
  636. 171 action list_templates 417
  637. 157 template income_statement 418
  638. 158 template balance_sheet 419
  639. 159 template invoice 420
  640. 160 template ar_transaction 421
  641. 161 template ap_transaction 422
  642. 162 template packing_list 423
  643. 163 template pick_list 424
  644. 164 template sales_order 425
  645. 165 template work_order 426
  646. 166 template purchase_order 427
  647. 167 template bin_list 428
  648. 168 template statement 429
  649. 169 template quotation 430
  650. 170 template rfq 431
  651. 171 template timecard 432
  652. 157 format HTML 433
  653. 158 format HTML 434
  654. 159 format HTML 435
  655. 160 format HTML 436
  656. 161 format HTML 437
  657. 162 format HTML 438
  658. 163 format HTML 439
  659. 164 format HTML 440
  660. 165 format HTML 441
  661. 166 format HTML 442
  662. 167 format HTML 443
  663. 168 format HTML 444
  664. 169 format HTML 445
  665. 170 format HTML 446
  666. 171 format HTML 447
  667. 172 menu 1 448
  668. 173 action list_templates 449
  669. 174 action list_templates 450
  670. 175 action list_templates 451
  671. 176 action list_templates 452
  672. 177 action list_templates 453
  673. 178 action list_templates 454
  674. 179 action list_templates 455
  675. 180 action list_templates 456
  676. 181 action list_templates 457
  677. 182 action list_templates 458
  678. 183 action list_templates 459
  679. 184 action list_templates 460
  680. 185 action list_templates 461
  681. 186 action list_templates 462
  682. 187 action list_templates 463
  683. 173 module am.pl 464
  684. 174 module am.pl 465
  685. 175 module am.pl 466
  686. 176 module am.pl 467
  687. 177 module am.pl 468
  688. 178 module am.pl 469
  689. 179 module am.pl 470
  690. 180 module am.pl 471
  691. 181 module am.pl 472
  692. 182 module am.pl 473
  693. 183 module am.pl 474
  694. 184 module am.pl 475
  695. 185 module am.pl 476
  696. 186 module am.pl 477
  697. 187 module am.pl 478
  698. 173 format LATEX 479
  699. 174 format LATEX 480
  700. 175 format LATEX 481
  701. 176 format LATEX 482
  702. 177 format LATEX 483
  703. 178 format LATEX 484
  704. 179 format LATEX 485
  705. 180 format LATEX 486
  706. 181 format LATEX 487
  707. 182 format LATEX 488
  708. 183 format LATEX 489
  709. 184 format LATEX 490
  710. 185 format LATEX 491
  711. 186 format LATEX 492
  712. 187 format LATEX 493
  713. 173 template invoice 506
  714. 174 template ar_transaction 507
  715. 175 template ap_transaction 508
  716. 176 template packing_list 509
  717. 177 template pick_list 510
  718. 178 template sales_order 511
  719. 179 template work_order 512
  720. 180 template purchase_order 513
  721. 181 template bin_list 514
  722. 182 template statement 515
  723. 185 template quotation 518
  724. 186 template rfq 519
  725. 187 template timecard 520
  726. 183 template check 516
  727. 184 template receipt 517
  728. 188 menu 1 521
  729. 189 module am.pl 522
  730. 189 action list_templates 523
  731. 189 template pos_invoice 524
  732. 189 format TEXT 525
  733. 190 action display_stylesheet 526
  734. 190 module am.pl 527
  735. 191 module am.pl 528
  736. 191 action config 529
  737. 193 module login.pl 532
  738. 193 action logout 533
  739. 193 target _top 534
  740. 192 menu 1 530
  741. 192 new 1 531
  742. \.
  743. --
  744. -- Name: menu_attribute_id_key; Type: CONSTRAINT; Schema: public; Owner: ledgersmb; Tablespace:
  745. --
  746. ALTER TABLE ONLY menu_attribute
  747. ADD CONSTRAINT menu_attribute_id_key UNIQUE (id);
  748. --
  749. -- Name: menu_attribute_pkey; Type: CONSTRAINT; Schema: public; Owner: ledgersmb; Tablespace:
  750. --
  751. ALTER TABLE ONLY menu_attribute
  752. ADD CONSTRAINT menu_attribute_pkey PRIMARY KEY (node_id, attribute);
  753. --
  754. -- Name: menu_attribute_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ledgersmb
  755. --
  756. ALTER TABLE ONLY menu_attribute
  757. ADD CONSTRAINT menu_attribute_node_id_fkey FOREIGN KEY (node_id) REFERENCES menu_node(id);
  758. --
  759. -- PostgreSQL database dump complete
  760. --
  761. --
  762. CREATE TABLE menu_acl (
  763. id serial NOT NULL,
  764. role_name character varying,
  765. acl_type character varying,
  766. node_id integer,
  767. CONSTRAINT menu_acl_acl_type_check CHECK ((((acl_type)::text = 'allow'::text) OR ((acl_type)::text = 'deny'::text)))
  768. );
  769. ALTER TABLE ONLY menu_acl
  770. ADD CONSTRAINT menu_acl_pkey PRIMARY KEY (id);
  771. ALTER TABLE ONLY menu_acl
  772. ADD CONSTRAINT menu_acl_node_id_fkey FOREIGN KEY (node_id) REFERENCES menu_node(id);
  773. --
  774. -- PostgreSQL database dump complete
  775. --
  776. CREATE TYPE menu_item AS (
  777. position int,
  778. id int,
  779. level int,
  780. label varchar,
  781. path varchar,
  782. args varchar[]
  783. );
  784. CREATE OR REPLACE FUNCTION menu_generate() RETURNS SETOF menu_item AS
  785. $$
  786. DECLARE
  787. item menu_item;
  788. arg menu_attribute%ROWTYPE;
  789. BEGIN
  790. FOR item IN
  791. SELECT n.position, n.id, c.level, n.label, c.path, '{}'
  792. FROM connectby('menu_node', 'id', 'parent', 'position', '0',
  793. 0, ',')
  794. c(id integer, parent integer, "level" integer,
  795. path text, list_order integer)
  796. JOIN menu_node n USING(id)
  797. LOOP
  798. FOR arg IN
  799. SELECT *
  800. FROM menu_attribute
  801. WHERE node_id = item.id
  802. LOOP
  803. item.args := item.args ||
  804. (arg.attribute || '=' || arg.value)::varchar;
  805. END LOOP;
  806. RETURN NEXT item;
  807. END LOOP;
  808. END;
  809. $$ language plpgsql;
  810. --
  811. -- PostgreSQL database dump
  812. --
  813. CREATE VIEW menu_friendly AS
  814. 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));
  815. ALTER TABLE public.menu_friendly OWNER TO ledgersmb;
  816. --
  817. -- PostgreSQL database dump complete
  818. --