summaryrefslogtreecommitdiff
path: root/doc/database/ledgersmb.html
blob: 078a1434e2185872da4ef296734fcc508e013d6d (plain)
  1. <!-- $Header: /cvsroot/autodoc/autodoc/html.tmpl,v 1.4 2006/05/16 19:01:27 rbt Exp $ -->
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  3. "http://www.w3.org/TR/html4/strict.dtd">
  4. <html>
  5. <head>
  6. <title>Index for lsmb13-new</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  8. <style type="text/css">
  9. BODY {
  10. color: #000000;
  11. background-color: #FFFFFF;
  12. font-family: Helvetica, sans-serif;
  13. }
  14. P {
  15. margin-top: 5px;
  16. margin-bottom: 5px;
  17. }
  18. P.w3ref {
  19. font-size: 8pt;
  20. font-style: italic;
  21. text-align: right;
  22. }
  23. P.detail {
  24. font-size: 10pt;
  25. }
  26. .error {
  27. color: #FFFFFF;
  28. background-color: #FF0000;
  29. }
  30. H1, H2, H3, H4, H5, H6 {
  31. }
  32. OL {
  33. list-style-type: upper-alpha;
  34. }
  35. UL.topic {
  36. list-style-type: upper-alpha;
  37. }
  38. LI.topic {
  39. font-weight : bold;
  40. }
  41. HR {
  42. color: #00FF00;
  43. background-color: #808080;
  44. }
  45. TABLE {
  46. border-width: medium;
  47. padding: 3px;
  48. background-color: #000000;
  49. width: 90%;
  50. }
  51. CAPTION {
  52. text-transform: capitalize;
  53. font-weight : bold;
  54. font-size: 14pt;
  55. }
  56. TH {
  57. color: #FFFFFF;
  58. background-color: #000000;
  59. text-align: left;
  60. }
  61. TR {
  62. color: #000000;
  63. background-color: #000000;
  64. vertical-align: top;
  65. }
  66. TR.tr0 {
  67. background-color: #F0F0F0;
  68. }
  69. TR.tr1 {
  70. background-color: #D8D8D8;
  71. }
  72. TD {
  73. font-size: 12pt;
  74. }
  75. TD.col0 {
  76. font-weight : bold;
  77. width: 20%;
  78. }
  79. TD.col1 {
  80. font-style: italic;
  81. width: 15%;
  82. }
  83. TD.col2 {
  84. font-size: 12px;
  85. }
  86. </style>
  87. <link rel="stylesheet" type="text/css" media="all" href="all.css">
  88. <link rel="stylesheet" type="text/css" media="screen" href="screen.css">
  89. <link rel="stylesheet" type="text/css" media="print" href="print.css">
  90. <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  91. </head>
  92. <body>
  93. <!-- Primary Index -->
  94. <p><br><br>Dumped on 2007-06-13</p>
  95. <h1><a name="index">Index of database - lsmb13-new</a></h1>
  96. <ul>
  97. <li><a name="public.schema">public</a></li><ul>
  98. <li><a href="#public.table.acc-trans">acc_trans</a></li><li><a href="#public.table.ap">ap</a></li><li><a href="#public.table.ar">ar</a></li><li><a href="#public.table.assembly">assembly</a></li><li><a href="#public.table.audittrail">audittrail</a></li><li><a href="#public.table.business">business</a></li><li><a href="#public.table.chart">chart</a></li><li><a href="#public.table.company">company</a></li><li><a href="#public.table.company-to-contact">company_to_contact</a></li><li><a href="#public.table.company-to-entity">company_to_entity</a></li><li><a href="#public.table.company-to-location">company_to_location</a></li><li><a href="#public.table.contact-class">contact_class</a></li><li><a href="#public.table.country">country</a></li><li><a href="#public.table.custom-field-catalog">custom_field_catalog</a></li><li><a href="#public.table.custom-table-catalog">custom_table_catalog</a></li><li><a href="#public.table.customer">customer</a></li><li><a href="#public.table.customertax">customertax</a></li><li><a href="#public.table.defaults">defaults</a></li><li><a href="#public.table.department">department</a></li><li><a href="#public.table.dpt-trans">dpt_trans</a></li><li><a href="#public.table.employee">employee</a></li><li><a href="#public.table.entity">entity</a></li><li><a href="#public.table.entity-class">entity_class</a></li><li><a href="#public.table.entity-class-to-entity">entity_class_to_entity</a></li><li><a href="#public.table.entity-other-name">entity_other_name</a></li><li><a href="#public.table.exchangerate">exchangerate</a></li><li><a href="#public.table.gifi">gifi</a></li><li><a href="#public.table.gl">gl</a></li><li><a href="#public.table.inventory">inventory</a></li><li><a href="#public.table.invoice">invoice</a></li><li><a href="#public.table.jcitems">jcitems</a></li><li><a href="#public.table.language">language</a></li><li><a href="#public.table.location">location</a></li><li><a href="#public.table.makemodel">makemodel</a></li><li><a href="#public.table.oe">oe</a></li><li><a href="#public.table.oe-class">oe_class</a></li><li><a href="#public.table.orderitems">orderitems</a></li><li><a href="#public.table.parts">parts</a></li><li><a href="#public.table.partscustomer">partscustomer</a></li><li><a href="#public.table.partsgroup">partsgroup</a></li><li><a href="#public.table.partstax">partstax</a></li><li><a href="#public.table.partsvendor">partsvendor</a></li><li><a href="#public.table.person">person</a></li><li><a href="#public.table.person-to-company">person_to_company</a></li><li><a href="#public.table.person-to-contact">person_to_contact</a></li><li><a href="#public.table.person-to-entity">person_to_entity</a></li><li><a href="#public.table.pricegroup">pricegroup</a></li><li><a href="#public.table.project">project</a></li><li><a href="#public.table.recurring">recurring</a></li><li><a href="#public.table.recurringemail">recurringemail</a></li><li><a href="#public.table.recurringprint">recurringprint</a></li><li><a href="#public.table.salutation">salutation</a></li><li><a href="#public.table.shipto">shipto</a></li><li><a href="#public.table.sic">sic</a></li><li><a href="#public.table.status">status</a></li><li><a href="#public.table.tax">tax</a></li><li><a href="#public.table.taxcategory">taxcategory</a></li><li><a href="#public.table.taxmodule">taxmodule</a></li><li><a href="#public.table.transactions">transactions</a></li><li><a href="#public.table.translation">translation</a></li><li><a href="#public.table.vendor">vendor</a></li><li><a href="#public.table.vendortax">vendortax</a></li><li><a href="#public.table.warehouse">warehouse</a></li><li><a href="#public.table.yearend">yearend</a></li>
  99. <li><a href="#public.function.add-custom-field-character-varying-character-varying-character-varying">add_custom_field( character varying, character varying, character varying )</a></li><li><a href="#public.function.avgcost-integer">avgcost( integer )</a></li><li><a href="#public.function.check-department">check_department( )</a></li><li><a href="#public.function.check-inventory">check_inventory( )</a></li><li><a href="#public.function.del-customer">del_customer( )</a></li><li><a href="#public.function.del-department">del_department( )</a></li><li><a href="#public.function.del-exchangerate">del_exchangerate( )</a></li><li><a href="#public.function.del-recurring">del_recurring( )</a></li><li><a href="#public.function.del-vendor">del_vendor( )</a></li><li><a href="#public.function.del-yearend">del_yearend( )</a></li><li><a href="#public.function.drop-custom-field-character-varying-character-varying">drop_custom_field( character varying, character varying )</a></li><li><a href="#public.function.lastcost-integer">lastcost( integer )</a></li><li><a href="#public.function.trigger-parts-short">trigger_parts_short( )</a></li><li><a href="#public.function.update-user-integer-text">update_user( integer, text )</a></li>
  100. </ul>
  101. </ul>
  102. <!-- Schema Creation -->
  103. <!-- publicpublic -->
  104. <hr>
  105. <h2>Table:
  106. <a name="public.table.acc-trans">acc_trans</a>
  107. </h2>
  108. <table width="100%" cellspacing="0" cellpadding="3">
  109. <caption>acc_trans Structure</caption>
  110. <tr>
  111. <th>F-Key</th>
  112. <th>Name</th>
  113. <th>Type</th>
  114. <th>Description</th>
  115. </tr>
  116. <tr class="tr0">
  117. <td>
  118. </td>
  119. <td>trans_id</td>
  120. <td>integer</td>
  121. <td><i>
  122. </i>
  123. </td>
  124. </tr>
  125. <tr class="tr1">
  126. <td>
  127. <a href="#public.table.chart">chart.id</a>
  128. </td>
  129. <td>chart_id</td>
  130. <td>integer</td>
  131. <td><i>
  132. NOT NULL
  133. </i>
  134. </td>
  135. </tr>
  136. <tr class="tr0">
  137. <td>
  138. </td>
  139. <td>amount</td>
  140. <td>numeric</td>
  141. <td><i>
  142. </i>
  143. </td>
  144. </tr>
  145. <tr class="tr1">
  146. <td>
  147. </td>
  148. <td>transdate</td>
  149. <td>date</td>
  150. <td><i>
  151. DEFAULT (&#39;now&#39;::text)::date
  152. </i>
  153. </td>
  154. </tr>
  155. <tr class="tr0">
  156. <td>
  157. </td>
  158. <td>source</td>
  159. <td>text</td>
  160. <td><i>
  161. </i>
  162. </td>
  163. </tr>
  164. <tr class="tr1">
  165. <td>
  166. </td>
  167. <td>cleared</td>
  168. <td>boolean</td>
  169. <td><i>
  170. DEFAULT false
  171. </i>
  172. </td>
  173. </tr>
  174. <tr class="tr0">
  175. <td>
  176. </td>
  177. <td>fx_transaction</td>
  178. <td>boolean</td>
  179. <td><i>
  180. DEFAULT false
  181. </i>
  182. </td>
  183. </tr>
  184. <tr class="tr1">
  185. <td>
  186. </td>
  187. <td>project_id</td>
  188. <td>integer</td>
  189. <td><i>
  190. </i>
  191. </td>
  192. </tr>
  193. <tr class="tr0">
  194. <td>
  195. </td>
  196. <td>memo</td>
  197. <td>text</td>
  198. <td><i>
  199. </i>
  200. </td>
  201. </tr>
  202. <tr class="tr1">
  203. <td>
  204. </td>
  205. <td>invoice_id</td>
  206. <td>integer</td>
  207. <td><i>
  208. </i>
  209. </td>
  210. </tr>
  211. <tr class="tr0">
  212. <td>
  213. </td>
  214. <td>entry_id</td>
  215. <td>serial</td>
  216. <td><i>
  217. PRIMARY KEY
  218. </i>
  219. </td>
  220. </tr>
  221. </table>
  222. <!-- Inherits -->
  223. <!-- Constraint List -->
  224. <!-- Foreign Key Discovery -->
  225. <!-- Indexes -->
  226. acc_trans_chart_id_key chart_id
  227. acc_trans_source_key lower(source)
  228. acc_trans_trans_id_key trans_id
  229. acc_trans_transdate_key transdate
  230. <!-- View Definition -->
  231. <!-- List off permissions -->
  232. <p>
  233. <a href="#index">Index</a> -
  234. <a href="#public.schema">Schema public</a>
  235. </p>
  236. <hr>
  237. <h2>Table:
  238. <a name="public.table.ap">ap</a>
  239. </h2>
  240. <table width="100%" cellspacing="0" cellpadding="3">
  241. <caption>ap Structure</caption>
  242. <tr>
  243. <th>F-Key</th>
  244. <th>Name</th>
  245. <th>Type</th>
  246. <th>Description</th>
  247. </tr>
  248. <tr class="tr0">
  249. <td>
  250. </td>
  251. <td>id</td>
  252. <td>serial</td>
  253. <td><i>
  254. PRIMARY KEY
  255. </i>
  256. </td>
  257. </tr>
  258. <tr class="tr1">
  259. <td>
  260. </td>
  261. <td>invnumber</td>
  262. <td>text</td>
  263. <td><i>
  264. </i>
  265. </td>
  266. </tr>
  267. <tr class="tr0">
  268. <td>
  269. </td>
  270. <td>transdate</td>
  271. <td>date</td>
  272. <td><i>
  273. DEFAULT (&#39;now&#39;::text)::date
  274. </i>
  275. </td>
  276. </tr>
  277. <tr class="tr1">
  278. <td>
  279. <a href="#public.table.entity">entity.id</a>
  280. </td>
  281. <td>entity_id</td>
  282. <td>integer</td>
  283. <td><i>
  284. </i>
  285. <br><br> Used to be customer_id, but customer is now metadata. You need to push to entity
  286. </td>
  287. </tr>
  288. <tr class="tr0">
  289. <td>
  290. </td>
  291. <td>taxincluded</td>
  292. <td>boolean</td>
  293. <td><i>
  294. DEFAULT false
  295. </i>
  296. </td>
  297. </tr>
  298. <tr class="tr1">
  299. <td>
  300. </td>
  301. <td>amount</td>
  302. <td>numeric</td>
  303. <td><i>
  304. </i>
  305. </td>
  306. </tr>
  307. <tr class="tr0">
  308. <td>
  309. </td>
  310. <td>netamount</td>
  311. <td>numeric</td>
  312. <td><i>
  313. </i>
  314. </td>
  315. </tr>
  316. <tr class="tr1">
  317. <td>
  318. </td>
  319. <td>paid</td>
  320. <td>numeric</td>
  321. <td><i>
  322. </i>
  323. </td>
  324. </tr>
  325. <tr class="tr0">
  326. <td>
  327. </td>
  328. <td>datepaid</td>
  329. <td>date</td>
  330. <td><i>
  331. </i>
  332. </td>
  333. </tr>
  334. <tr class="tr1">
  335. <td>
  336. </td>
  337. <td>duedate</td>
  338. <td>date</td>
  339. <td><i>
  340. </i>
  341. </td>
  342. </tr>
  343. <tr class="tr0">
  344. <td>
  345. </td>
  346. <td>invoice</td>
  347. <td>boolean</td>
  348. <td><i>
  349. DEFAULT false
  350. </i>
  351. </td>
  352. </tr>
  353. <tr class="tr1">
  354. <td>
  355. </td>
  356. <td>ordnumber</td>
  357. <td>text</td>
  358. <td><i>
  359. </i>
  360. </td>
  361. </tr>
  362. <tr class="tr0">
  363. <td>
  364. </td>
  365. <td>curr</td>
  366. <td>character(3)</td>
  367. <td><i>
  368. </i>
  369. </td>
  370. </tr>
  371. <tr class="tr1">
  372. <td>
  373. </td>
  374. <td>notes</td>
  375. <td>text</td>
  376. <td><i>
  377. </i>
  378. </td>
  379. </tr>
  380. <tr class="tr0">
  381. <td>
  382. <a href="#public.table.person">person.id</a>
  383. </td>
  384. <td>person_id</td>
  385. <td>integer</td>
  386. <td><i>
  387. NOT NULL
  388. </i>
  389. </td>
  390. </tr>
  391. <tr class="tr1">
  392. <td>
  393. </td>
  394. <td>till</td>
  395. <td>character varying(20)</td>
  396. <td><i>
  397. </i>
  398. </td>
  399. </tr>
  400. <tr class="tr0">
  401. <td>
  402. </td>
  403. <td>quonumber</td>
  404. <td>text</td>
  405. <td><i>
  406. </i>
  407. </td>
  408. </tr>
  409. <tr class="tr1">
  410. <td>
  411. </td>
  412. <td>intnotes</td>
  413. <td>text</td>
  414. <td><i>
  415. </i>
  416. </td>
  417. </tr>
  418. <tr class="tr0">
  419. <td>
  420. </td>
  421. <td>department_id</td>
  422. <td>integer</td>
  423. <td><i>
  424. </i>
  425. </td>
  426. </tr>
  427. <tr class="tr1">
  428. <td>
  429. </td>
  430. <td>shipvia</td>
  431. <td>text</td>
  432. <td><i>
  433. </i>
  434. </td>
  435. </tr>
  436. <tr class="tr0">
  437. <td>
  438. </td>
  439. <td>language_code</td>
  440. <td>character varying(6)</td>
  441. <td><i>
  442. </i>
  443. </td>
  444. </tr>
  445. <tr class="tr1">
  446. <td>
  447. </td>
  448. <td>ponumber</td>
  449. <td>text</td>
  450. <td><i>
  451. </i>
  452. </td>
  453. </tr>
  454. <tr class="tr0">
  455. <td>
  456. </td>
  457. <td>shippingpoint</td>
  458. <td>text</td>
  459. <td><i>
  460. </i>
  461. </td>
  462. </tr>
  463. <tr class="tr1">
  464. <td>
  465. </td>
  466. <td>terms</td>
  467. <td>smallint</td>
  468. <td><i>
  469. </i>
  470. </td>
  471. </tr>
  472. </table>
  473. <!-- Inherits -->
  474. <!-- Constraint List -->
  475. <!-- Foreign Key Discovery -->
  476. <!-- Indexes -->
  477. ap_id_key id
  478. ap_invnumber_key invnumber
  479. ap_ordnumber_key ordnumber
  480. ap_quonumber_key quonumber
  481. ap_transdate_key transdate
  482. <!-- View Definition -->
  483. <!-- List off permissions -->
  484. <p>
  485. <a href="#index">Index</a> -
  486. <a href="#public.schema">Schema public</a>
  487. </p>
  488. <hr>
  489. <h2>Table:
  490. <a name="public.table.ar">ar</a>
  491. </h2>
  492. <table width="100%" cellspacing="0" cellpadding="3">
  493. <caption>ar Structure</caption>
  494. <tr>
  495. <th>F-Key</th>
  496. <th>Name</th>
  497. <th>Type</th>
  498. <th>Description</th>
  499. </tr>
  500. <tr class="tr0">
  501. <td>
  502. </td>
  503. <td>id</td>
  504. <td>serial</td>
  505. <td><i>
  506. PRIMARY KEY
  507. </i>
  508. </td>
  509. </tr>
  510. <tr class="tr1">
  511. <td>
  512. </td>
  513. <td>invnumber</td>
  514. <td>text</td>
  515. <td><i>
  516. </i>
  517. </td>
  518. </tr>
  519. <tr class="tr0">
  520. <td>
  521. </td>
  522. <td>transdate</td>
  523. <td>date</td>
  524. <td><i>
  525. DEFAULT (&#39;now&#39;::text)::date
  526. </i>
  527. </td>
  528. </tr>
  529. <tr class="tr1">
  530. <td>
  531. <a href="#public.table.entity">entity.id</a>
  532. </td>
  533. <td>entity_id</td>
  534. <td>integer</td>
  535. <td><i>
  536. </i>
  537. <br><br> Used to be customer_id, but customer is now metadata. You need to push to entity
  538. </td>
  539. </tr>
  540. <tr class="tr0">
  541. <td>
  542. </td>
  543. <td>taxincluded</td>
  544. <td>boolean</td>
  545. <td><i>
  546. </i>
  547. </td>
  548. </tr>
  549. <tr class="tr1">
  550. <td>
  551. </td>
  552. <td>amount</td>
  553. <td>numeric</td>
  554. <td><i>
  555. </i>
  556. </td>
  557. </tr>
  558. <tr class="tr0">
  559. <td>
  560. </td>
  561. <td>netamount</td>
  562. <td>numeric</td>
  563. <td><i>
  564. </i>
  565. </td>
  566. </tr>
  567. <tr class="tr1">
  568. <td>
  569. </td>
  570. <td>paid</td>
  571. <td>numeric</td>
  572. <td><i>
  573. </i>
  574. </td>
  575. </tr>
  576. <tr class="tr0">
  577. <td>
  578. </td>
  579. <td>datepaid</td>
  580. <td>date</td>
  581. <td><i>
  582. </i>
  583. </td>
  584. </tr>
  585. <tr class="tr1">
  586. <td>
  587. </td>
  588. <td>duedate</td>
  589. <td>date</td>
  590. <td><i>
  591. </i>
  592. </td>
  593. </tr>
  594. <tr class="tr0">
  595. <td>
  596. </td>
  597. <td>invoice</td>
  598. <td>boolean</td>
  599. <td><i>
  600. DEFAULT false
  601. </i>
  602. </td>
  603. </tr>
  604. <tr class="tr1">
  605. <td>
  606. </td>
  607. <td>shippingpoint</td>
  608. <td>text</td>
  609. <td><i>
  610. </i>
  611. </td>
  612. </tr>
  613. <tr class="tr0">
  614. <td>
  615. </td>
  616. <td>terms</td>
  617. <td>smallint</td>
  618. <td><i>
  619. </i>
  620. </td>
  621. </tr>
  622. <tr class="tr1">
  623. <td>
  624. </td>
  625. <td>notes</td>
  626. <td>text</td>
  627. <td><i>
  628. </i>
  629. </td>
  630. </tr>
  631. <tr class="tr0">
  632. <td>
  633. </td>
  634. <td>curr</td>
  635. <td>character(3)</td>
  636. <td><i>
  637. </i>
  638. </td>
  639. </tr>
  640. <tr class="tr1">
  641. <td>
  642. </td>
  643. <td>ordnumber</td>
  644. <td>text</td>
  645. <td><i>
  646. </i>
  647. </td>
  648. </tr>
  649. <tr class="tr0">
  650. <td>
  651. <a href="#public.table.person">person.id</a>
  652. </td>
  653. <td>person_id</td>
  654. <td>integer</td>
  655. <td><i>
  656. NOT NULL
  657. </i>
  658. </td>
  659. </tr>
  660. <tr class="tr1">
  661. <td>
  662. </td>
  663. <td>till</td>
  664. <td>character varying(20)</td>
  665. <td><i>
  666. </i>
  667. </td>
  668. </tr>
  669. <tr class="tr0">
  670. <td>
  671. </td>
  672. <td>quonumber</td>
  673. <td>text</td>
  674. <td><i>
  675. </i>
  676. </td>
  677. </tr>
  678. <tr class="tr1">
  679. <td>
  680. </td>
  681. <td>intnotes</td>
  682. <td>text</td>
  683. <td><i>
  684. </i>
  685. </td>
  686. </tr>
  687. <tr class="tr0">
  688. <td>
  689. </td>
  690. <td>department_id</td>
  691. <td>integer</td>
  692. <td><i>
  693. </i>
  694. </td>
  695. </tr>
  696. <tr class="tr1">
  697. <td>
  698. </td>
  699. <td>shipvia</td>
  700. <td>text</td>
  701. <td><i>
  702. </i>
  703. </td>
  704. </tr>
  705. <tr class="tr0">
  706. <td>
  707. </td>
  708. <td>language_code</td>
  709. <td>character varying(6)</td>
  710. <td><i>
  711. </i>
  712. </td>
  713. </tr>
  714. <tr class="tr1">
  715. <td>
  716. </td>
  717. <td>ponumber</td>
  718. <td>text</td>
  719. <td><i>
  720. </i>
  721. </td>
  722. </tr>
  723. </table>
  724. <!-- Inherits -->
  725. <!-- Constraint List -->
  726. <!-- Foreign Key Discovery -->
  727. <!-- Indexes -->
  728. ar_id_key id
  729. ar_invnumber_key invnumber
  730. ar_ordnumber_key ordnumber
  731. ar_quonumber_key quonumber
  732. ar_transdate_key transdate
  733. <!-- View Definition -->
  734. <!-- List off permissions -->
  735. <p>
  736. <a href="#index">Index</a> -
  737. <a href="#public.schema">Schema public</a>
  738. </p>
  739. <hr>
  740. <h2>Table:
  741. <a name="public.table.assembly">assembly</a>
  742. </h2>
  743. <table width="100%" cellspacing="0" cellpadding="3">
  744. <caption>assembly Structure</caption>
  745. <tr>
  746. <th>F-Key</th>
  747. <th>Name</th>
  748. <th>Type</th>
  749. <th>Description</th>
  750. </tr>
  751. <tr class="tr0">
  752. <td>
  753. </td>
  754. <td>id</td>
  755. <td>integer</td>
  756. <td><i>
  757. PRIMARY KEY
  758. </i>
  759. </td>
  760. </tr>
  761. <tr class="tr1">
  762. <td>
  763. </td>
  764. <td>parts_id</td>
  765. <td>integer</td>
  766. <td><i>
  767. PRIMARY KEY
  768. </i>
  769. </td>
  770. </tr>
  771. <tr class="tr0">
  772. <td>
  773. </td>
  774. <td>qty</td>
  775. <td>numeric</td>
  776. <td><i>
  777. </i>
  778. </td>
  779. </tr>
  780. <tr class="tr1">
  781. <td>
  782. </td>
  783. <td>bom</td>
  784. <td>boolean</td>
  785. <td><i>
  786. </i>
  787. </td>
  788. </tr>
  789. <tr class="tr0">
  790. <td>
  791. </td>
  792. <td>adj</td>
  793. <td>boolean</td>
  794. <td><i>
  795. </i>
  796. </td>
  797. </tr>
  798. </table>
  799. <!-- Inherits -->
  800. <!-- Constraint List -->
  801. <!-- Foreign Key Discovery -->
  802. <!-- Indexes -->
  803. assembly_id_key id
  804. <!-- View Definition -->
  805. <!-- List off permissions -->
  806. <p>
  807. <a href="#index">Index</a> -
  808. <a href="#public.schema">Schema public</a>
  809. </p>
  810. <hr>
  811. <h2>Table:
  812. <a name="public.table.audittrail">audittrail</a>
  813. </h2>
  814. <table width="100%" cellspacing="0" cellpadding="3">
  815. <caption>audittrail Structure</caption>
  816. <tr>
  817. <th>F-Key</th>
  818. <th>Name</th>
  819. <th>Type</th>
  820. <th>Description</th>
  821. </tr>
  822. <tr class="tr0">
  823. <td>
  824. </td>
  825. <td>trans_id</td>
  826. <td>integer</td>
  827. <td><i>
  828. </i>
  829. </td>
  830. </tr>
  831. <tr class="tr1">
  832. <td>
  833. </td>
  834. <td>tablename</td>
  835. <td>text</td>
  836. <td><i>
  837. </i>
  838. </td>
  839. </tr>
  840. <tr class="tr0">
  841. <td>
  842. </td>
  843. <td>reference</td>
  844. <td>text</td>
  845. <td><i>
  846. </i>
  847. </td>
  848. </tr>
  849. <tr class="tr1">
  850. <td>
  851. </td>
  852. <td>formname</td>
  853. <td>text</td>
  854. <td><i>
  855. </i>
  856. </td>
  857. </tr>
  858. <tr class="tr0">
  859. <td>
  860. </td>
  861. <td>action</td>
  862. <td>text</td>
  863. <td><i>
  864. </i>
  865. </td>
  866. </tr>
  867. <tr class="tr1">
  868. <td>
  869. </td>
  870. <td>transdate</td>
  871. <td>timestamp without time zone</td>
  872. <td><i>
  873. DEFAULT now()
  874. </i>
  875. </td>
  876. </tr>
  877. <tr class="tr0">
  878. <td>
  879. <a href="#public.table.person">person.id</a>
  880. </td>
  881. <td>person_id</td>
  882. <td>integer</td>
  883. <td><i>
  884. NOT NULL
  885. </i>
  886. </td>
  887. </tr>
  888. <tr class="tr1">
  889. <td>
  890. </td>
  891. <td>entry_id</td>
  892. <td>bigserial</td>
  893. <td><i>
  894. PRIMARY KEY
  895. </i>
  896. </td>
  897. </tr>
  898. </table>
  899. <!-- Inherits -->
  900. <!-- Constraint List -->
  901. <!-- Foreign Key Discovery -->
  902. <!-- Indexes -->
  903. audittrail_trans_id_key trans_id
  904. <!-- View Definition -->
  905. <!-- List off permissions -->
  906. <p>
  907. <a href="#index">Index</a> -
  908. <a href="#public.schema">Schema public</a>
  909. </p>
  910. <hr>
  911. <h2>Table:
  912. <a name="public.table.business">business</a>
  913. </h2>
  914. <table width="100%" cellspacing="0" cellpadding="3">
  915. <caption>business Structure</caption>
  916. <tr>
  917. <th>F-Key</th>
  918. <th>Name</th>
  919. <th>Type</th>
  920. <th>Description</th>
  921. </tr>
  922. <tr class="tr0">
  923. <td>
  924. </td>
  925. <td>id</td>
  926. <td>serial</td>
  927. <td><i>
  928. PRIMARY KEY
  929. </i>
  930. </td>
  931. </tr>
  932. <tr class="tr1">
  933. <td>
  934. </td>
  935. <td>description</td>
  936. <td>text</td>
  937. <td><i>
  938. </i>
  939. </td>
  940. </tr>
  941. <tr class="tr0">
  942. <td>
  943. </td>
  944. <td>discount</td>
  945. <td>numeric</td>
  946. <td><i>
  947. </i>
  948. </td>
  949. </tr>
  950. </table>
  951. <!-- Inherits -->
  952. <!-- Constraint List -->
  953. <!-- Foreign Key Discovery -->
  954. <!-- Indexes -->
  955. <!-- View Definition -->
  956. <!-- List off permissions -->
  957. <p>
  958. <a href="#index">Index</a> -
  959. <a href="#public.schema">Schema public</a>
  960. </p>
  961. <hr>
  962. <h2>Table:
  963. <a name="public.table.chart">chart</a>
  964. </h2>
  965. <table width="100%" cellspacing="0" cellpadding="3">
  966. <caption>chart Structure</caption>
  967. <tr>
  968. <th>F-Key</th>
  969. <th>Name</th>
  970. <th>Type</th>
  971. <th>Description</th>
  972. </tr>
  973. <tr class="tr0">
  974. <td>
  975. </td>
  976. <td>id</td>
  977. <td>serial</td>
  978. <td><i>
  979. PRIMARY KEY
  980. </i>
  981. </td>
  982. </tr>
  983. <tr class="tr1">
  984. <td>
  985. </td>
  986. <td>accno</td>
  987. <td>text</td>
  988. <td><i>
  989. NOT NULL
  990. </i>
  991. </td>
  992. </tr>
  993. <tr class="tr0">
  994. <td>
  995. </td>
  996. <td>description</td>
  997. <td>text</td>
  998. <td><i>
  999. </i>
  1000. </td>
  1001. </tr>
  1002. <tr class="tr1">
  1003. <td>
  1004. </td>
  1005. <td>charttype</td>
  1006. <td>character(1)</td>
  1007. <td><i>
  1008. DEFAULT &#39;A&#39;::bpchar
  1009. </i>
  1010. </td>
  1011. </tr>
  1012. <tr class="tr0">
  1013. <td>
  1014. </td>
  1015. <td>category</td>
  1016. <td>character(1)</td>
  1017. <td><i>
  1018. </i>
  1019. </td>
  1020. </tr>
  1021. <tr class="tr1">
  1022. <td>
  1023. </td>
  1024. <td>link</td>
  1025. <td>text</td>
  1026. <td><i>
  1027. </i>
  1028. </td>
  1029. </tr>
  1030. <tr class="tr0">
  1031. <td>
  1032. </td>
  1033. <td>gifi_accno</td>
  1034. <td>text</td>
  1035. <td><i>
  1036. </i>
  1037. </td>
  1038. </tr>
  1039. <tr class="tr1">
  1040. <td>
  1041. </td>
  1042. <td>contra</td>
  1043. <td>boolean</td>
  1044. <td><i>
  1045. DEFAULT false
  1046. </i>
  1047. </td>
  1048. </tr>
  1049. </table>
  1050. <!-- Inherits -->
  1051. <!-- Constraint List -->
  1052. <!-- Foreign Key Discovery -->
  1053. <p>Tables referencing this one via Foreign Key Constraints:</p>
  1054. <ul>
  1055. <li><a href="#public.table.acc-trans">acc_trans</a></li>
  1056. </ul>
  1057. <ul>
  1058. <li><a href="#public.table.partstax">partstax</a></li>
  1059. </ul>
  1060. <ul>
  1061. <li><a href="#public.table.tax">tax</a></li>
  1062. </ul>
  1063. <!-- Indexes -->
  1064. chart_category_key category
  1065. chart_gifi_accno_key gifi_accno
  1066. chart_id_key id
  1067. chart_link_key link
  1068. <!-- View Definition -->
  1069. <!-- List off permissions -->
  1070. <p>
  1071. <a href="#index">Index</a> -
  1072. <a href="#public.schema">Schema public</a>
  1073. </p>
  1074. <hr>
  1075. <h2>Table:
  1076. <a name="public.table.company">company</a>
  1077. </h2>
  1078. <table width="100%" cellspacing="0" cellpadding="3">
  1079. <caption>company Structure</caption>
  1080. <tr>
  1081. <th>F-Key</th>
  1082. <th>Name</th>
  1083. <th>Type</th>
  1084. <th>Description</th>
  1085. </tr>
  1086. <tr class="tr0">
  1087. <td>
  1088. </td>
  1089. <td>id</td>
  1090. <td>serial</td>
  1091. <td><i>
  1092. UNIQUE
  1093. NOT NULL
  1094. </i>
  1095. </td>
  1096. </tr>
  1097. <tr class="tr1">
  1098. <td>
  1099. <a href="#public.table.entity">entity.id</a>
  1100. </td>
  1101. <td>entity_id</td>
  1102. <td>integer</td>
  1103. <td><i>
  1104. NOT NULL
  1105. </i>
  1106. </td>
  1107. </tr>
  1108. <tr class="tr0">
  1109. <td>
  1110. </td>
  1111. <td>legal_name</td>
  1112. <td>text</td>
  1113. <td><i>
  1114. PRIMARY KEY
  1115. </i>
  1116. </td>
  1117. </tr>
  1118. <tr class="tr1">
  1119. <td>
  1120. <a href="#public.table.entity-class">entity_class.id</a>
  1121. </td>
  1122. <td>entity_class_id</td>
  1123. <td>integer</td>
  1124. <td><i>
  1125. NOT NULL
  1126. </i>
  1127. </td>
  1128. </tr>
  1129. <tr class="tr0">
  1130. <td>
  1131. <a href="#public.table.location">location.id</a>
  1132. </td>
  1133. <td>primary_location_id</td>
  1134. <td>integer</td>
  1135. <td><i>
  1136. PRIMARY KEY
  1137. </i>
  1138. <br><br> This is the location that should show up by default for any forms
  1139. </td>
  1140. </tr>
  1141. <tr class="tr1">
  1142. <td>
  1143. </td>
  1144. <td>tax_id</td>
  1145. <td>text</td>
  1146. <td><i>
  1147. </i>
  1148. <br><br> In the US this would be a EIN.
  1149. </td>
  1150. </tr>
  1151. </table>
  1152. <!-- Inherits -->
  1153. <!-- Constraint List -->
  1154. <p>&nbsp;</p>
  1155. <table width="100%" cellspacing="0" cellpadding="3">
  1156. <caption>company Constraints</caption>
  1157. <tr>
  1158. <th>Name</th>
  1159. <th>Constraint</th>
  1160. </tr>
  1161. <tr class="tr0">
  1162. <td>company_legal_name_check</td>
  1163. <td>CHECK ((legal_name ~ &#39;[[:alnum:]_]&#39;::text))</td>
  1164. </tr>
  1165. </table>
  1166. <!-- Foreign Key Discovery -->
  1167. <p>Tables referencing this one via Foreign Key Constraints:</p>
  1168. <ul>
  1169. <li><a href="#public.table.company-to-contact">company_to_contact</a></li>
  1170. </ul>
  1171. <ul>
  1172. <li><a href="#public.table.company-to-entity">company_to_entity</a></li>
  1173. </ul>
  1174. <ul>
  1175. <li><a href="#public.table.company-to-location">company_to_location</a></li>
  1176. </ul>
  1177. <!-- Indexes -->
  1178. <!-- View Definition -->
  1179. <!-- List off permissions -->
  1180. <p>
  1181. <a href="#index">Index</a> -
  1182. <a href="#public.schema">Schema public</a>
  1183. </p>
  1184. <hr>
  1185. <h2>Table:
  1186. <a name="public.table.company-to-contact">company_to_contact</a>
  1187. </h2>
  1188. <p> To keep track of the relationship between multiple contact methods and a single company </p>
  1189. <table width="100%" cellspacing="0" cellpadding="3">
  1190. <caption>company_to_contact Structure</caption>
  1191. <tr>
  1192. <th>F-Key</th>
  1193. <th>Name</th>
  1194. <th>Type</th>
  1195. <th>Description</th>
  1196. </tr>
  1197. <tr class="tr0">
  1198. <td>
  1199. <a href="#public.table.company">company.id</a>
  1200. </td>
  1201. <td>company_id</td>
  1202. <td>integer</td>
  1203. <td><i>
  1204. PRIMARY KEY
  1205. </i>
  1206. </td>
  1207. </tr>
  1208. <tr class="tr1">
  1209. <td>
  1210. <a href="#public.table.contact-class">contact_class.id</a>
  1211. </td>
  1212. <td>contact_class_id</td>
  1213. <td>integer</td>
  1214. <td><i>
  1215. PRIMARY KEY
  1216. </i>
  1217. </td>
  1218. </tr>
  1219. <tr class="tr0">
  1220. <td>
  1221. </td>
  1222. <td>contact</td>
  1223. <td>text</td>
  1224. <td><i>
  1225. PRIMARY KEY
  1226. </i>
  1227. </td>
  1228. </tr>
  1229. </table>
  1230. <!-- Inherits -->
  1231. <!-- Constraint List -->
  1232. <p>&nbsp;</p>
  1233. <table width="100%" cellspacing="0" cellpadding="3">
  1234. <caption>company_to_contact Constraints</caption>
  1235. <tr>
  1236. <th>Name</th>
  1237. <th>Constraint</th>
  1238. </tr>
  1239. <tr class="tr0">
  1240. <td>company_to_contact_contact_check</td>
  1241. <td>CHECK ((contact ~ &#39;[[:alnum:]_]&#39;::text))</td>
  1242. </tr>
  1243. </table>
  1244. <!-- Foreign Key Discovery -->
  1245. <!-- Indexes -->
  1246. <!-- View Definition -->
  1247. <!-- List off permissions -->
  1248. <p>
  1249. <a href="#index">Index</a> -
  1250. <a href="#public.schema">Schema public</a>
  1251. </p>
  1252. <hr>
  1253. <h2>Table:
  1254. <a name="public.table.company-to-entity">company_to_entity</a>
  1255. </h2>
  1256. <table width="100%" cellspacing="0" cellpadding="3">
  1257. <caption>company_to_entity Structure</caption>
  1258. <tr>
  1259. <th>F-Key</th>
  1260. <th>Name</th>
  1261. <th>Type</th>
  1262. <th>Description</th>
  1263. </tr>
  1264. <tr class="tr0">
  1265. <td>
  1266. <a href="#public.table.company">company.id</a>
  1267. </td>
  1268. <td>company_id</td>
  1269. <td>integer</td>
  1270. <td><i>
  1271. PRIMARY KEY
  1272. </i>
  1273. </td>
  1274. </tr>
  1275. <tr class="tr1">
  1276. <td>
  1277. <a href="#public.table.entity">entity.id</a>
  1278. </td>
  1279. <td>entity_id</td>
  1280. <td>integer</td>
  1281. <td><i>
  1282. PRIMARY KEY
  1283. </i>
  1284. </td>
  1285. </tr>
  1286. <tr class="tr0">
  1287. <td>
  1288. </td>
  1289. <td>related_how</td>
  1290. <td>text</td>
  1291. <td><i>
  1292. </i>
  1293. </td>
  1294. </tr>
  1295. <tr class="tr1">
  1296. <td>
  1297. </td>
  1298. <td>created</td>
  1299. <td>date</td>
  1300. <td><i>
  1301. NOT NULL
  1302. DEFAULT (&#39;now&#39;::text)::date
  1303. </i>
  1304. </td>
  1305. </tr>
  1306. </table>
  1307. <!-- Inherits -->
  1308. <!-- Constraint List -->
  1309. <p>&nbsp;</p>
  1310. <table width="100%" cellspacing="0" cellpadding="3">
  1311. <caption>company_to_entity Constraints</caption>
  1312. <tr>
  1313. <th>Name</th>
  1314. <th>Constraint</th>
  1315. </tr>
  1316. <tr class="tr0">
  1317. <td>company_to_entity_check</td>
  1318. <td>CHECK ((entity_id &lt;&gt; company_id))</td>
  1319. </tr>
  1320. </table>
  1321. <!-- Foreign Key Discovery -->
  1322. <!-- Indexes -->
  1323. <!-- View Definition -->
  1324. <!-- List off permissions -->
  1325. <p>
  1326. <a href="#index">Index</a> -
  1327. <a href="#public.schema">Schema public</a>
  1328. </p>
  1329. <hr>
  1330. <h2>Table:
  1331. <a name="public.table.company-to-location">company_to_location</a>
  1332. </h2>
  1333. <table width="100%" cellspacing="0" cellpadding="3">
  1334. <caption>company_to_location Structure</caption>
  1335. <tr>
  1336. <th>F-Key</th>
  1337. <th>Name</th>
  1338. <th>Type</th>
  1339. <th>Description</th>
  1340. </tr>
  1341. <tr class="tr0">
  1342. <td>
  1343. <a href="#public.table.location">location.id</a>
  1344. </td>
  1345. <td>location_id</td>
  1346. <td>integer</td>
  1347. <td><i>
  1348. PRIMARY KEY
  1349. </i>
  1350. </td>
  1351. </tr>
  1352. <tr class="tr1">
  1353. <td>
  1354. <a href="#public.table.company">company.id</a>
  1355. </td>
  1356. <td>company_id</td>
  1357. <td>integer</td>
  1358. <td><i>
  1359. PRIMARY KEY
  1360. </i>
  1361. </td>
  1362. </tr>
  1363. </table>
  1364. <!-- Inherits -->
  1365. <!-- Constraint List -->
  1366. <!-- Foreign Key Discovery -->
  1367. <!-- Indexes -->
  1368. <!-- View Definition -->
  1369. <!-- List off permissions -->
  1370. <p>
  1371. <a href="#index">Index</a> -
  1372. <a href="#public.schema">Schema public</a>
  1373. </p>
  1374. <hr>
  1375. <h2>Table:
  1376. <a name="public.table.contact-class">contact_class</a>
  1377. </h2>
  1378. <table width="100%" cellspacing="0" cellpadding="3">
  1379. <caption>contact_class Structure</caption>
  1380. <tr>
  1381. <th>F-Key</th>
  1382. <th>Name</th>
  1383. <th>Type</th>
  1384. <th>Description</th>
  1385. </tr>
  1386. <tr class="tr0">
  1387. <td>
  1388. </td>
  1389. <td>id</td>
  1390. <td>serial</td>
  1391. <td><i>
  1392. UNIQUE
  1393. NOT NULL
  1394. </i>
  1395. </td>
  1396. </tr>
  1397. <tr class="tr1">
  1398. <td>
  1399. </td>
  1400. <td>class</td>
  1401. <td>text</td>
  1402. <td><i>
  1403. PRIMARY KEY
  1404. </i>
  1405. </td>
  1406. </tr>
  1407. </table>
  1408. <!-- Inherits -->
  1409. <!-- Constraint List -->
  1410. <p>&nbsp;</p>
  1411. <table width="100%" cellspacing="0" cellpadding="3">
  1412. <caption>contact_class Constraints</caption>
  1413. <tr>
  1414. <th>Name</th>
  1415. <th>Constraint</th>
  1416. </tr>
  1417. <tr class="tr0">
  1418. <td>contact_class_class_check</td>
  1419. <td>CHECK ((&quot;class&quot; ~ &#39;[[:alnum:]_]&#39;::text))</td>
  1420. </tr>
  1421. </table>
  1422. <!-- Foreign Key Discovery -->
  1423. <p>Tables referencing this one via Foreign Key Constraints:</p>
  1424. <ul>
  1425. <li><a href="#public.table.company-to-contact">company_to_contact</a></li>
  1426. </ul>
  1427. <ul>
  1428. <li><a href="#public.table.person-to-contact">person_to_contact</a></li>
  1429. </ul>
  1430. <!-- Indexes -->
  1431. <!-- View Definition -->
  1432. <!-- List off permissions -->
  1433. <p>
  1434. <a href="#index">Index</a> -
  1435. <a href="#public.schema">Schema public</a>
  1436. </p>
  1437. <hr>
  1438. <h2>Table:
  1439. <a name="public.table.country">country</a>
  1440. </h2>
  1441. <table width="100%" cellspacing="0" cellpadding="3">
  1442. <caption>country Structure</caption>
  1443. <tr>
  1444. <th>F-Key</th>
  1445. <th>Name</th>
  1446. <th>Type</th>
  1447. <th>Description</th>
  1448. </tr>
  1449. <tr class="tr0">
  1450. <td>
  1451. </td>
  1452. <td>id</td>
  1453. <td>serial</td>
  1454. <td><i>
  1455. PRIMARY KEY
  1456. </i>
  1457. </td>
  1458. </tr>
  1459. <tr class="tr1">
  1460. <td>
  1461. </td>
  1462. <td>name</td>
  1463. <td>text</td>
  1464. <td><i>
  1465. NOT NULL
  1466. </i>
  1467. </td>
  1468. </tr>
  1469. <tr class="tr0">
  1470. <td>
  1471. </td>
  1472. <td>short_name</td>
  1473. <td>text</td>
  1474. <td><i>
  1475. NOT NULL
  1476. </i>
  1477. </td>
  1478. </tr>
  1479. <tr class="tr1">
  1480. <td>
  1481. </td>
  1482. <td>itu</td>
  1483. <td>text</td>
  1484. <td><i>
  1485. </i>
  1486. <br><br> The ITU Telecommunication Standardization Sector code for calling internationally. For example, the US is 1, Great Britain is 44
  1487. </td>
  1488. </tr>
  1489. </table>
  1490. <!-- Inherits -->
  1491. <!-- Constraint List -->
  1492. <p>&nbsp;</p>
  1493. <table width="100%" cellspacing="0" cellpadding="3">
  1494. <caption>country Constraints</caption>
  1495. <tr>
  1496. <th>Name</th>
  1497. <th>Constraint</th>
  1498. </tr>
  1499. <tr class="tr0">
  1500. <td>country_name_check</td>
  1501. <td>CHECK ((name ~ &#39;[[:alnum:]_]&#39;::text))</td>
  1502. </tr>
  1503. <tr class="tr1">
  1504. <td>country_short_name_check</td>
  1505. <td>CHECK ((short_name ~ &#39;[[:alnum:]_]&#39;::text))</td>
  1506. </tr>
  1507. </table>
  1508. <!-- Foreign Key Discovery -->
  1509. <p>Tables referencing this one via Foreign Key Constraints:</p>
  1510. <ul>
  1511. <li><a href="#public.table.location">location</a></li>
  1512. </ul>
  1513. <!-- Indexes -->
  1514. <!-- View Definition -->
  1515. <!-- List off permissions -->
  1516. <p>
  1517. <a href="#index">Index</a> -
  1518. <a href="#public.schema">Schema public</a>
  1519. </p>
  1520. <hr>
  1521. <h2>Table:
  1522. <a name="public.table.custom-field-catalog">custom_field_catalog</a>
  1523. </h2>
  1524. <table width="100%" cellspacing="0" cellpadding="3">
  1525. <caption>custom_field_catalog Structure</caption>
  1526. <tr>
  1527. <th>F-Key</th>
  1528. <th>Name</th>
  1529. <th>Type</th>
  1530. <th>Description</th>
  1531. </tr>
  1532. <tr class="tr0">
  1533. <td>
  1534. </td>
  1535. <td>field_id</td>
  1536. <td>serial</td>
  1537. <td><i>
  1538. PRIMARY KEY
  1539. </i>
  1540. </td>
  1541. </tr>
  1542. <tr class="tr1">
  1543. <td>
  1544. <a href="#public.table.custom-table-catalog">custom_table_catalog.table_id</a>
  1545. </td>
  1546. <td>table_id</td>
  1547. <td>integer</td>
  1548. <td><i>
  1549. </i>
  1550. </td>
  1551. </tr>
  1552. <tr class="tr0">
  1553. <td>
  1554. </td>
  1555. <td>field_name</td>
  1556. <td>text</td>
  1557. <td><i>
  1558. </i>
  1559. </td>
  1560. </tr>
  1561. </table>
  1562. <!-- Inherits -->
  1563. <!-- Constraint List -->
  1564. <!-- Foreign Key Discovery -->
  1565. <!-- Indexes -->
  1566. <!-- View Definition -->
  1567. <!-- List off permissions -->
  1568. <p>
  1569. <a href="#index">Index</a> -
  1570. <a href="#public.schema">Schema public</a>
  1571. </p>
  1572. <hr>
  1573. <h2>Table:
  1574. <a name="public.table.custom-table-catalog">custom_table_catalog</a>
  1575. </h2>
  1576. <table width="100%" cellspacing="0" cellpadding="3">
  1577. <caption>custom_table_catalog Structure</caption>
  1578. <tr>
  1579. <th>F-Key</th>
  1580. <th>Name</th>
  1581. <th>Type</th>
  1582. <th>Description</th>
  1583. </tr>
  1584. <tr class="tr0">
  1585. <td>
  1586. </td>
  1587. <td>table_id</td>
  1588. <td>serial</td>
  1589. <td><i>
  1590. PRIMARY KEY
  1591. </i>
  1592. </td>
  1593. </tr>
  1594. <tr class="tr1">
  1595. <td>
  1596. </td>
  1597. <td>extends</td>
  1598. <td>text</td>
  1599. <td><i>
  1600. </i>
  1601. </td>
  1602. </tr>
  1603. <tr class="tr0">
  1604. <td>
  1605. </td>
  1606. <td>table_name</td>
  1607. <td>text</td>
  1608. <td><i>
  1609. </i>
  1610. </td>
  1611. </tr>
  1612. </table>
  1613. <!-- Inherits -->
  1614. <!-- Constraint List -->
  1615. <!-- Foreign Key Discovery -->
  1616. <p>Tables referencing this one via Foreign Key Constraints:</p>
  1617. <ul>
  1618. <li><a href="#public.table.custom-field-catalog">custom_field_catalog</a></li>
  1619. </ul>
  1620. <!-- Indexes -->
  1621. <!-- View Definition -->
  1622. <!-- List off permissions -->
  1623. <p>
  1624. <a href="#index">Index</a> -
  1625. <a href="#public.schema">Schema public</a>
  1626. </p>
  1627. <hr>
  1628. <h2>Table:
  1629. <a name="public.table.customer">customer</a>
  1630. </h2>
  1631. <p> This is now a metadata table that holds information specific to customers. Source info is not part of the entity management </p>
  1632. <table width="100%" cellspacing="0" cellpadding="3">
  1633. <caption>customer Structure</caption>
  1634. <tr>
  1635. <th>F-Key</th>
  1636. <th>Name</th>
  1637. <th>Type</th>
  1638. <th>Description</th>
  1639. </tr>
  1640. <tr class="tr0">
  1641. <td>
  1642. </td>
  1643. <td>id</td>
  1644. <td>serial</td>
  1645. <td><i>
  1646. PRIMARY KEY
  1647. </i>
  1648. </td>
  1649. </tr>
  1650. <tr class="tr1">
  1651. <td>
  1652. <a href="#public.table.entity">entity.id</a>
  1653. </td>
  1654. <td>entity_id</td>
  1655. <td>integer</td>
  1656. <td><i>
  1657. </i>
  1658. <br><br> This is the relationship between entities and customers
  1659. </td>
  1660. </tr>
  1661. <tr class="tr0">
  1662. <td>
  1663. </td>
  1664. <td>discount</td>
  1665. <td>numeric</td>
  1666. <td><i>
  1667. </i>
  1668. </td>
  1669. </tr>
  1670. <tr class="tr1">
  1671. <td>
  1672. </td>
  1673. <td>taxincluded</td>
  1674. <td>boolean</td>
  1675. <td><i>
  1676. DEFAULT false
  1677. </i>
  1678. </td>
  1679. </tr>
  1680. <tr class="tr0">
  1681. <td>
  1682. </td>
  1683. <td>creditlimit</td>
  1684. <td>numeric</td>
  1685. <td><i>
  1686. </i>
  1687. </td>
  1688. </tr>
  1689. <tr class="tr1">
  1690. <td>
  1691. </td>
  1692. <td>terms</td>
  1693. <td>smallint</td>
  1694. <td><i>
  1695. </i>
  1696. </td>
  1697. </tr>
  1698. <tr class="tr0">
  1699. <td>
  1700. </td>
  1701. <td>customernumber</td>
  1702. <td>character varying(32)</td>
  1703. <td><i>
  1704. </i>
  1705. </td>
  1706. </tr>
  1707. <tr class="tr1">
  1708. <td>
  1709. </td>
  1710. <td>cc</td>
  1711. <td>text</td>
  1712. <td><i>
  1713. </i>
  1714. </td>
  1715. </tr>
  1716. <tr class="tr0">
  1717. <td>
  1718. </td>
  1719. <td>bcc</td>
  1720. <td>text</td>
  1721. <td><i>
  1722. </i>
  1723. </td>
  1724. </tr>
  1725. <tr class="tr1">
  1726. <td>
  1727. </td>
  1728. <td>business_id</td>
  1729. <td>integer</td>
  1730. <td><i>
  1731. </i>
  1732. </td>
  1733. </tr>
  1734. <tr class="tr0">
  1735. <td>
  1736. </td>
  1737. <td>sic_code</td>
  1738. <td>character varying(6)</td>
  1739. <td><i>
  1740. </i>
  1741. </td>
  1742. </tr>
  1743. <tr class="tr1">
  1744. <td>
  1745. </td>
  1746. <td>iban</td>
  1747. <td>character varying(34)</td>
  1748. <td><i>
  1749. </i>
  1750. </td>
  1751. </tr>
  1752. <tr class="tr0">
  1753. <td>
  1754. </td>
  1755. <td>bic</td>
  1756. <td>character varying(11)</td>
  1757. <td><i>
  1758. </i>
  1759. </td>
  1760. </tr>
  1761. <tr class="tr1">
  1762. <td>
  1763. </td>
  1764. <td>language_code</td>
  1765. <td>character varying(6)</td>
  1766. <td><i>
  1767. </i>
  1768. </td>
  1769. </tr>
  1770. <tr class="tr0">
  1771. <td>
  1772. </td>
  1773. <td>pricegroup_id</td>
  1774. <td>integer</td>
  1775. <td><i>
  1776. </i>
  1777. </td>
  1778. </tr>
  1779. <tr class="tr1">
  1780. <td>
  1781. </td>
  1782. <td>curr</td>
  1783. <td>character(3)</td>
  1784. <td><i>
  1785. </i>
  1786. </td>
  1787. </tr>
  1788. <tr class="tr0">
  1789. <td>
  1790. </td>
  1791. <td>startdate</td>
  1792. <td>date</td>
  1793. <td><i>
  1794. DEFAULT (&#39;now&#39;::text)::date
  1795. </i>
  1796. </td>
  1797. </tr>
  1798. <tr class="tr1">
  1799. <td>
  1800. </td>
  1801. <td>enddate</td>
  1802. <td>date</td>
  1803. <td><i>
  1804. </i>
  1805. </td>
  1806. </tr>
  1807. <tr class="tr0">
  1808. <td>
  1809. </td>
  1810. <td>invoice_notes</td>
  1811. <td>text</td>
  1812. <td><i>
  1813. </i>
  1814. </td>
  1815. </tr>
  1816. </table>
  1817. <!-- Inherits -->
  1818. <!-- Constraint List -->
  1819. <!-- Foreign Key Discovery -->
  1820. <!-- Indexes -->
  1821. customer_customernumber_key customernumber
  1822. customer_id_key id
  1823. <!-- View Definition -->
  1824. <!-- List off permissions -->
  1825. <p>
  1826. <a href="#index">Index</a> -
  1827. <a href="#public.schema">Schema public</a>
  1828. </p>
  1829. <hr>
  1830. <h2>Table:
  1831. <a name="public.table.customertax">customertax</a>
  1832. </h2>
  1833. <table width="100%" cellspacing="0" cellpadding="3">
  1834. <caption>customertax Structure</caption>
  1835. <tr>
  1836. <th>F-Key</th>
  1837. <th>Name</th>
  1838. <th>Type</th>
  1839. <th>Description</th>
  1840. </tr>
  1841. <tr class="tr0">
  1842. <td>
  1843. </td>
  1844. <td>customer_id</td>
  1845. <td>integer</td>
  1846. <td><i>
  1847. PRIMARY KEY
  1848. </i>
  1849. </td>
  1850. </tr>
  1851. <tr class="tr1">
  1852. <td>
  1853. </td>
  1854. <td>chart_id</td>
  1855. <td>integer</td>
  1856. <td><i>
  1857. PRIMARY KEY
  1858. </i>
  1859. </td>
  1860. </tr>
  1861. </table>
  1862. <!-- Inherits -->
  1863. <!-- Constraint List -->
  1864. <!-- Foreign Key Discovery -->
  1865. <!-- Indexes -->
  1866. customer_customer_id_key customer_id
  1867. <!-- View Definition -->
  1868. <!-- List off permissions -->
  1869. <p>
  1870. <a href="#index">Index</a> -
  1871. <a href="#public.schema">Schema public</a>
  1872. </p>
  1873. <hr>
  1874. <h2>Table:
  1875. <a name="public.table.defaults">defaults</a>
  1876. </h2>
  1877. <table width="100%" cellspacing="0" cellpadding="3">
  1878. <caption>defaults Structure</caption>
  1879. <tr>
  1880. <th>F-Key</th>
  1881. <th>Name</th>
  1882. <th>Type</th>
  1883. <th>Description</th>
  1884. </tr>
  1885. <tr class="tr0">
  1886. <td>
  1887. </td>
  1888. <td>setting_key</td>
  1889. <td>text</td>
  1890. <td><i>
  1891. PRIMARY KEY
  1892. </i>
  1893. </td>
  1894. </tr>
  1895. <tr class="tr1">
  1896. <td>
  1897. </td>
  1898. <td>value</td>
  1899. <td>text</td>
  1900. <td><i>
  1901. </i>
  1902. </td>
  1903. </tr>
  1904. </table>
  1905. <!-- Inherits -->
  1906. <!-- Constraint List -->
  1907. <!-- Foreign Key Discovery -->
  1908. <!-- Indexes -->
  1909. <!-- View Definition -->
  1910. <!-- List off permissions -->
  1911. <p>
  1912. <a href="#index">Index</a> -
  1913. <a href="#public.schema">Schema public</a>
  1914. </p>
  1915. <hr>
  1916. <h2>Table:
  1917. <a name="public.table.department">department</a>
  1918. </h2>
  1919. <table width="100%" cellspacing="0" cellpadding="3">
  1920. <caption>department Structure</caption>
  1921. <tr>
  1922. <th>F-Key</th>
  1923. <th>Name</th>
  1924. <th>Type</th>
  1925. <th>Description</th>
  1926. </tr>
  1927. <tr class="tr0">
  1928. <td>
  1929. </td>
  1930. <td>id</td>
  1931. <td>serial</td>
  1932. <td><i>
  1933. PRIMARY KEY
  1934. </i>
  1935. </td>
  1936. </tr>
  1937. <tr class="tr1">
  1938. <td>
  1939. </td>
  1940. <td>description</td>
  1941. <td>text</td>
  1942. <td><i>
  1943. </i>
  1944. </td>
  1945. </tr>
  1946. <tr class="tr0">
  1947. <td>
  1948. </td>
  1949. <td>role</td>
  1950. <td>character(1)</td>
  1951. <td><i>
  1952. DEFAULT &#39;P&#39;::bpchar
  1953. </i>
  1954. </td>
  1955. </tr>
  1956. </table>
  1957. <!-- Inherits -->
  1958. <!-- Constraint List -->
  1959. <!-- Foreign Key Discovery -->
  1960. <!-- Indexes -->
  1961. department_id_key id
  1962. <!-- View Definition -->
  1963. <!-- List off permissions -->
  1964. <p>
  1965. <a href="#index">Index</a> -
  1966. <a href="#public.schema">Schema public</a>
  1967. </p>
  1968. <hr>
  1969. <h2>Table:
  1970. <a name="public.table.dpt-trans">dpt_trans</a>
  1971. </h2>
  1972. <table width="100%" cellspacing="0" cellpadding="3">
  1973. <caption>dpt_trans Structure</caption>
  1974. <tr>
  1975. <th>F-Key</th>
  1976. <th>Name</th>
  1977. <th>Type</th>
  1978. <th>Description</th>
  1979. </tr>
  1980. <tr class="tr0">
  1981. <td>
  1982. </td>
  1983. <td>trans_id</td>
  1984. <td>integer</td>
  1985. <td><i>
  1986. PRIMARY KEY
  1987. </i>
  1988. </td>
  1989. </tr>
  1990. <tr class="tr1">
  1991. <td>
  1992. </td>
  1993. <td>department_id</td>
  1994. <td>integer</td>
  1995. <td><i>
  1996. </i>
  1997. </td>
  1998. </tr>
  1999. </table>
  2000. <!-- Inherits -->
  2001. <!-- Constraint List -->
  2002. <!-- Foreign Key Discovery -->
  2003. <!-- Indexes -->
  2004. <!-- View Definition -->
  2005. <!-- List off permissions -->
  2006. <p>
  2007. <a href="#index">Index</a> -
  2008. <a href="#public.schema">Schema public</a>
  2009. </p>
  2010. <hr>
  2011. <h2>Table:
  2012. <a name="public.table.employee">employee</a>
  2013. </h2>
  2014. <p> Is a metadata table specific to employees </p>
  2015. <table width="100%" cellspacing="0" cellpadding="3">
  2016. <caption>employee Structure</caption>
  2017. <tr>
  2018. <th>F-Key</th>
  2019. <th>Name</th>
  2020. <th>Type</th>
  2021. <th>Description</th>
  2022. </tr>
  2023. <tr class="tr0">
  2024. <td>
  2025. </td>
  2026. <td>id</td>
  2027. <td>serial</td>
  2028. <td><i>
  2029. PRIMARY KEY
  2030. </i>
  2031. </td>
  2032. </tr>
  2033. <tr class="tr1">
  2034. <td>
  2035. <a href="#public.table.entity">entity.id</a>
  2036. </td>
  2037. <td>entity_id</td>
  2038. <td>integer</td>
  2039. <td><i>
  2040. NOT NULL
  2041. </i>
  2042. </td>
  2043. </tr>
  2044. <tr class="tr0">
  2045. <td>
  2046. </td>
  2047. <td>login</td>
  2048. <td>text</td>
  2049. <td><i>
  2050. </i>
  2051. </td>
  2052. </tr>
  2053. <tr class="tr1">
  2054. <td>
  2055. </td>
  2056. <td>startdate</td>
  2057. <td>date</td>
  2058. <td><i>
  2059. DEFAULT (&#39;now&#39;::text)::date
  2060. </i>
  2061. </td>
  2062. </tr>
  2063. <tr class="tr0">
  2064. <td>
  2065. </td>
  2066. <td>enddate</td>
  2067. <td>date</td>
  2068. <td><i>
  2069. </i>
  2070. </td>
  2071. </tr>
  2072. <tr class="tr1">
  2073. <td>
  2074. </td>
  2075. <td>notes</td>
  2076. <td>text</td>
  2077. <td><i>
  2078. </i>
  2079. </td>
  2080. </tr>
  2081. <tr class="tr0">
  2082. <td>
  2083. </td>
  2084. <td>role</td>
  2085. <td>character varying(20)</td>
  2086. <td><i>
  2087. </i>
  2088. </td>
  2089. </tr>
  2090. <tr class="tr1">
  2091. <td>
  2092. </td>
  2093. <td>sales</td>
  2094. <td>boolean</td>
  2095. <td><i>
  2096. DEFAULT false
  2097. </i>
  2098. </td>
  2099. </tr>
  2100. <tr class="tr0">
  2101. <td>
  2102. </td>
  2103. <td>ssn</td>
  2104. <td>character varying(20)</td>
  2105. <td><i>
  2106. </i>
  2107. </td>
  2108. </tr>
  2109. <tr class="tr1">
  2110. <td>
  2111. </td>
  2112. <td>iban</td>
  2113. <td>character varying(34)</td>
  2114. <td><i>
  2115. </i>
  2116. </td>
  2117. </tr>
  2118. <tr class="tr0">
  2119. <td>
  2120. </td>
  2121. <td>bic</td>
  2122. <td>character varying(11)</td>
  2123. <td><i>
  2124. </i>
  2125. </td>
  2126. </tr>
  2127. <tr class="tr1">
  2128. <td>
  2129. </td>
  2130. <td>managerid</td>
  2131. <td>integer</td>
  2132. <td><i>
  2133. </i>
  2134. </td>
  2135. </tr>
  2136. <tr class="tr0">
  2137. <td>
  2138. </td>
  2139. <td>employeenumber</td>
  2140. <td>character varying(32)</td>
  2141. <td><i>
  2142. </i>
  2143. </td>
  2144. </tr>
  2145. <tr class="tr1">
  2146. <td>
  2147. </td>
  2148. <td>dob</td>
  2149. <td>date</td>
  2150. <td><i>
  2151. </i>
  2152. </td>
  2153. </tr>
  2154. </table>
  2155. <!-- Inherits -->
  2156. <!-- Constraint List -->
  2157. <!-- Foreign Key Discovery -->
  2158. <!-- Indexes -->
  2159. <!-- View Definition -->
  2160. <!-- List off permissions -->
  2161. <p>
  2162. <a href="#index">Index</a> -
  2163. <a href="#public.schema">Schema public</a>
  2164. </p>
  2165. <hr>
  2166. <h2>Table:
  2167. <a name="public.table.entity">entity</a>
  2168. </h2>
  2169. <p> The primary entity table to map to all contacts </p>
  2170. <table width="100%" cellspacing="0" cellpadding="3">
  2171. <caption>entity Structure</caption>
  2172. <tr>
  2173. <th>F-Key</th>
  2174. <th>Name</th>
  2175. <th>Type</th>
  2176. <th>Description</th>
  2177. </tr>
  2178. <tr class="tr0">
  2179. <td>
  2180. </td>
  2181. <td>id</td>
  2182. <td>serial</td>
  2183. <td><i>
  2184. PRIMARY KEY
  2185. </i>
  2186. </td>
  2187. </tr>
  2188. <tr class="tr1">
  2189. <td>
  2190. </td>
  2191. <td>name</td>
  2192. <td>text</td>
  2193. <td><i>
  2194. </i>
  2195. <br><br> This is the common name of an entity. If it was a person it may be Joshua Drake, a company Acme Corp. You may also choose to use a domain such as commandprompt.com
  2196. </td>
  2197. </tr>
  2198. <tr class="tr0">
  2199. <td>
  2200. <a href="#public.table.entity-class">entity_class.id</a>
  2201. </td>
  2202. <td>entity_class</td>
  2203. <td>integer</td>
  2204. <td><i>
  2205. NOT NULL
  2206. </i>
  2207. </td>
  2208. </tr>
  2209. </table>
  2210. <!-- Inherits -->
  2211. <!-- Constraint List -->
  2212. <p>&nbsp;</p>
  2213. <table width="100%" cellspacing="0" cellpadding="3">
  2214. <caption>entity Constraints</caption>
  2215. <tr>
  2216. <th>Name</th>
  2217. <th>Constraint</th>
  2218. </tr>
  2219. <tr class="tr0">
  2220. <td>entity_name_check</td>
  2221. <td>CHECK ((name ~ &#39;[[:alnum:]_]&#39;::text))</td>
  2222. </tr>
  2223. </table>
  2224. <!-- Foreign Key Discovery -->
  2225. <p>Tables referencing this one via Foreign Key Constraints:</p>
  2226. <ul>
  2227. <li><a href="#public.table.ap">ap</a></li>
  2228. </ul>
  2229. <ul>
  2230. <li><a href="#public.table.ar">ar</a></li>
  2231. </ul>
  2232. <ul>
  2233. <li><a href="#public.table.company">company</a></li>
  2234. </ul>
  2235. <ul>
  2236. <li><a href="#public.table.company-to-entity">company_to_entity</a></li>
  2237. </ul>
  2238. <ul>
  2239. <li><a href="#public.table.customer">customer</a></li>
  2240. </ul>
  2241. <ul>
  2242. <li><a href="#public.table.employee">employee</a></li>
  2243. </ul>
  2244. <ul>
  2245. <li><a href="#public.table.entity-class-to-entity">entity_class_to_entity</a></li>
  2246. </ul>
  2247. <ul>
  2248. <li><a href="#public.table.entity-other-name">entity_other_name</a></li>
  2249. </ul>
  2250. <ul>
  2251. <li><a href="#public.table.oe">oe</a></li>
  2252. </ul>
  2253. <ul>
  2254. <li><a href="#public.table.partsvendor">partsvendor</a></li>
  2255. </ul>
  2256. <ul>
  2257. <li><a href="#public.table.person">person</a></li>
  2258. </ul>
  2259. <ul>
  2260. <li><a href="#public.table.person-to-entity">person_to_entity</a></li>
  2261. </ul>
  2262. <ul>
  2263. <li><a href="#public.table.vendor">vendor</a></li>
  2264. </ul>
  2265. <!-- Indexes -->
  2266. <!-- View Definition -->
  2267. <!-- List off permissions -->
  2268. <p>
  2269. <a href="#index">Index</a> -
  2270. <a href="#public.schema">Schema public</a>
  2271. </p>
  2272. <hr>
  2273. <h2>Table:
  2274. <a name="public.table.entity-class">entity_class</a>
  2275. </h2>
  2276. <p> Defines the class type such as vendor, customer, contact, employee </p>
  2277. <table width="100%" cellspacing="0" cellpadding="3">
  2278. <caption>entity_class Structure</caption>
  2279. <tr>
  2280. <th>F-Key</th>
  2281. <th>Name</th>
  2282. <th>Type</th>
  2283. <th>Description</th>
  2284. </tr>
  2285. <tr class="tr0">
  2286. <td>
  2287. </td>
  2288. <td>id</td>
  2289. <td>serial</td>
  2290. <td><i>
  2291. PRIMARY KEY
  2292. </i>
  2293. <br><br> The first 7 values are reserved and permanent
  2294. </td>
  2295. </tr>
  2296. <tr class="tr1">
  2297. <td>
  2298. </td>
  2299. <td>class</td>
  2300. <td>text</td>
  2301. <td><i>
  2302. NOT NULL
  2303. </i>
  2304. </td>
  2305. </tr>
  2306. <tr class="tr0">
  2307. <td>
  2308. </td>
  2309. <td>active</td>
  2310. <td>boolean</td>
  2311. <td><i>
  2312. NOT NULL
  2313. DEFAULT true
  2314. </i>
  2315. </td>
  2316. </tr>
  2317. </table>
  2318. <!-- Inherits -->
  2319. <!-- Constraint List -->
  2320. <p>&nbsp;</p>
  2321. <table width="100%" cellspacing="0" cellpadding="3">
  2322. <caption>entity_class Constraints</caption>
  2323. <tr>
  2324. <th>Name</th>
  2325. <th>Constraint</th>
  2326. </tr>
  2327. <tr class="tr0">
  2328. <td>entity_class_class_check</td>
  2329. <td>CHECK ((&quot;class&quot; ~ &#39;[[:alnum:]_]&#39;::text))</td>
  2330. </tr>
  2331. </table>
  2332. <!-- Foreign Key Discovery -->
  2333. <p>Tables referencing this one via Foreign Key Constraints:</p>
  2334. <ul>
  2335. <li><a href="#public.table.company">company</a></li>
  2336. </ul>
  2337. <ul>
  2338. <li><a href="#public.table.entity">entity</a></li>
  2339. </ul>
  2340. <ul>
  2341. <li><a href="#public.table.entity-class-to-entity">entity_class_to_entity</a></li>
  2342. </ul>
  2343. <!-- Indexes -->
  2344. <!-- View Definition -->
  2345. <!-- List off permissions -->
  2346. <p>
  2347. <a href="#index">Index</a> -
  2348. <a href="#public.schema">Schema public</a>
  2349. </p>
  2350. <hr>
  2351. <h2>Table:
  2352. <a name="public.table.entity-class-to-entity">entity_class_to_entity</a>
  2353. </h2>
  2354. <p> Relation builder for classes to entity </p>
  2355. <table width="100%" cellspacing="0" cellpadding="3">
  2356. <caption>entity_class_to_entity Structure</caption>
  2357. <tr>
  2358. <th>F-Key</th>
  2359. <th>Name</th>
  2360. <th>Type</th>
  2361. <th>Description</th>
  2362. </tr>
  2363. <tr class="tr0">
  2364. <td>
  2365. <a href="#public.table.entity-class">entity_class.id</a>
  2366. </td>
  2367. <td>entity_class_id</td>
  2368. <td>integer</td>
  2369. <td><i>
  2370. PRIMARY KEY
  2371. </i>
  2372. </td>
  2373. </tr>
  2374. <tr class="tr1">
  2375. <td>
  2376. <a href="#public.table.entity">entity.id</a>
  2377. </td>
  2378. <td>entity_id</td>
  2379. <td>integer</td>
  2380. <td><i>
  2381. PRIMARY KEY
  2382. </i>
  2383. </td>
  2384. </tr>
  2385. </table>
  2386. <!-- Inherits -->
  2387. <!-- Constraint List -->
  2388. <!-- Foreign Key Discovery -->
  2389. <!-- Indexes -->
  2390. <!-- View Definition -->
  2391. <!-- List off permissions -->
  2392. <p>
  2393. <a href="#index">Index</a> -
  2394. <a href="#public.schema">Schema public</a>
  2395. </p>
  2396. <hr>
  2397. <h2>Table:
  2398. <a name="public.table.entity-other-name">entity_other_name</a>
  2399. </h2>
  2400. <p> Similar to company_other_name, a person may be jd, Joshua Drake, linuxpoet... all are the same person. </p>
  2401. <table width="100%" cellspacing="0" cellpadding="3">
  2402. <caption>entity_other_name Structure</caption>
  2403. <tr>
  2404. <th>F-Key</th>
  2405. <th>Name</th>
  2406. <th>Type</th>
  2407. <th>Description</th>
  2408. </tr>
  2409. <tr class="tr0">
  2410. <td>
  2411. <a href="#public.table.entity">entity.id</a>
  2412. </td>
  2413. <td>entity_id</td>
  2414. <td>integer</td>
  2415. <td><i>
  2416. PRIMARY KEY
  2417. </i>
  2418. </td>
  2419. </tr>
  2420. <tr class="tr1">
  2421. <td>
  2422. </td>
  2423. <td>other_name</td>
  2424. <td>text</td>
  2425. <td><i>
  2426. PRIMARY KEY
  2427. </i>
  2428. </td>
  2429. </tr>
  2430. </table>
  2431. <!-- Inherits -->
  2432. <!-- Constraint List -->
  2433. <p>&nbsp;</p>
  2434. <table width="100%" cellspacing="0" cellpadding="3">
  2435. <caption>entity_other_name Constraints</caption>
  2436. <tr>
  2437. <th>Name</th>
  2438. <th>Constraint</th>
  2439. </tr>
  2440. <tr class="tr0">
  2441. <td>entity_other_name_other_name_check</td>
  2442. <td>CHECK ((other_name ~ &#39;[[:alnum:]_]&#39;::text))</td>
  2443. </tr>
  2444. </table>
  2445. <!-- Foreign Key Discovery -->
  2446. <!-- Indexes -->
  2447. <!-- View Definition -->
  2448. <!-- List off permissions -->
  2449. <p>
  2450. <a href="#index">Index</a> -
  2451. <a href="#public.schema">Schema public</a>
  2452. </p>
  2453. <hr>
  2454. <h2>Table:
  2455. <a name="public.table.exchangerate">exchangerate</a>
  2456. </h2>
  2457. <table width="100%" cellspacing="0" cellpadding="3">
  2458. <caption>exchangerate Structure</caption>
  2459. <tr>
  2460. <th>F-Key</th>
  2461. <th>Name</th>
  2462. <th>Type</th>
  2463. <th>Description</th>
  2464. </tr>
  2465. <tr class="tr0">
  2466. <td>
  2467. </td>
  2468. <td>curr</td>
  2469. <td>character(3)</td>
  2470. <td><i>
  2471. PRIMARY KEY
  2472. </i>
  2473. </td>
  2474. </tr>
  2475. <tr class="tr1">
  2476. <td>
  2477. </td>
  2478. <td>transdate</td>
  2479. <td>date</td>
  2480. <td><i>
  2481. PRIMARY KEY
  2482. </i>
  2483. </td>
  2484. </tr>
  2485. <tr class="tr0">
  2486. <td>
  2487. </td>
  2488. <td>buy</td>
  2489. <td>numeric</td>
  2490. <td><i>
  2491. </i>
  2492. </td>
  2493. </tr>
  2494. <tr class="tr1">
  2495. <td>
  2496. </td>
  2497. <td>sell</td>
  2498. <td>numeric</td>
  2499. <td><i>
  2500. </i>
  2501. </td>
  2502. </tr>
  2503. </table>
  2504. <!-- Inherits -->
  2505. <!-- Constraint List -->
  2506. <!-- Foreign Key Discovery -->
  2507. <!-- Indexes -->
  2508. exchangerate_ct_key curr, transdate
  2509. <!-- View Definition -->
  2510. <!-- List off permissions -->
  2511. <p>
  2512. <a href="#index">Index</a> -
  2513. <a href="#public.schema">Schema public</a>
  2514. </p>
  2515. <hr>
  2516. <h2>Table:
  2517. <a name="public.table.gifi">gifi</a>
  2518. </h2>
  2519. <table width="100%" cellspacing="0" cellpadding="3">
  2520. <caption>gifi Structure</caption>
  2521. <tr>
  2522. <th>F-Key</th>
  2523. <th>Name</th>
  2524. <th>Type</th>
  2525. <th>Description</th>
  2526. </tr>
  2527. <tr class="tr0">
  2528. <td>
  2529. </td>
  2530. <td>accno</td>
  2531. <td>text</td>
  2532. <td><i>
  2533. PRIMARY KEY
  2534. </i>
  2535. </td>
  2536. </tr>
  2537. <tr class="tr1">
  2538. <td>
  2539. </td>
  2540. <td>description</td>
  2541. <td>text</td>
  2542. <td><i>
  2543. </i>
  2544. </td>
  2545. </tr>
  2546. </table>
  2547. <!-- Inherits -->
  2548. <!-- Constraint List -->
  2549. <!-- Foreign Key Discovery -->
  2550. <!-- Indexes -->
  2551. <!-- View Definition -->
  2552. <!-- List off permissions -->
  2553. <p>
  2554. <a href="#index">Index</a> -
  2555. <a href="#public.schema">Schema public</a>
  2556. </p>
  2557. <hr>
  2558. <h2>Table:
  2559. <a name="public.table.gl">gl</a>
  2560. </h2>
  2561. <table width="100%" cellspacing="0" cellpadding="3">
  2562. <caption>gl Structure</caption>
  2563. <tr>
  2564. <th>F-Key</th>
  2565. <th>Name</th>
  2566. <th>Type</th>
  2567. <th>Description</th>
  2568. </tr>
  2569. <tr class="tr0">
  2570. <td>
  2571. </td>
  2572. <td>id</td>
  2573. <td>serial</td>
  2574. <td><i>
  2575. PRIMARY KEY
  2576. </i>
  2577. </td>
  2578. </tr>
  2579. <tr class="tr1">
  2580. <td>
  2581. </td>
  2582. <td>reference</td>
  2583. <td>text</td>
  2584. <td><i>
  2585. </i>
  2586. </td>
  2587. </tr>
  2588. <tr class="tr0">
  2589. <td>
  2590. </td>
  2591. <td>description</td>
  2592. <td>text</td>
  2593. <td><i>
  2594. </i>
  2595. </td>
  2596. </tr>
  2597. <tr class="tr1">
  2598. <td>
  2599. </td>
  2600. <td>transdate</td>
  2601. <td>date</td>
  2602. <td><i>
  2603. DEFAULT (&#39;now&#39;::text)::date
  2604. </i>
  2605. </td>
  2606. </tr>
  2607. <tr class="tr0">
  2608. <td>
  2609. <a href="#public.table.person">person.id</a>
  2610. </td>
  2611. <td>person_id</td>
  2612. <td>integer</td>
  2613. <td><i>
  2614. </i>
  2615. </td>
  2616. </tr>
  2617. <tr class="tr1">
  2618. <td>
  2619. </td>
  2620. <td>notes</td>
  2621. <td>text</td>
  2622. <td><i>
  2623. </i>
  2624. </td>
  2625. </tr>
  2626. <tr class="tr0">
  2627. <td>
  2628. </td>
  2629. <td>department_id</td>
  2630. <td>integer</td>
  2631. <td><i>
  2632. </i>
  2633. </td>
  2634. </tr>
  2635. </table>
  2636. <!-- Inherits -->
  2637. <!-- Constraint List -->
  2638. <!-- Foreign Key Discovery -->
  2639. <!-- Indexes -->
  2640. gl_description_key lower(description)
  2641. gl_id_key id
  2642. gl_reference_key reference
  2643. gl_transdate_key transdate
  2644. <!-- View Definition -->
  2645. <!-- List off permissions -->
  2646. <p>
  2647. <a href="#index">Index</a> -
  2648. <a href="#public.schema">Schema public</a>
  2649. </p>
  2650. <hr>
  2651. <h2>Table:
  2652. <a name="public.table.inventory">inventory</a>
  2653. </h2>
  2654. <table width="100%" cellspacing="0" cellpadding="3">
  2655. <caption>inventory Structure</caption>
  2656. <tr>
  2657. <th>F-Key</th>
  2658. <th>Name</th>
  2659. <th>Type</th>
  2660. <th>Description</th>
  2661. </tr>
  2662. <tr class="tr0">
  2663. <td>
  2664. </td>
  2665. <td>warehouse_id</td>
  2666. <td>integer</td>
  2667. <td><i>
  2668. </i>
  2669. </td>
  2670. </tr>
  2671. <tr class="tr1">
  2672. <td>
  2673. </td>
  2674. <td>parts_id</td>
  2675. <td>integer</td>
  2676. <td><i>
  2677. </i>
  2678. </td>
  2679. </tr>
  2680. <tr class="tr0">
  2681. <td>
  2682. </td>
  2683. <td>trans_id</td>
  2684. <td>integer</td>
  2685. <td><i>
  2686. </i>
  2687. </td>
  2688. </tr>
  2689. <tr class="tr1">
  2690. <td>
  2691. </td>
  2692. <td>orderitems_id</td>
  2693. <td>integer</td>
  2694. <td><i>
  2695. </i>
  2696. </td>
  2697. </tr>
  2698. <tr class="tr0">
  2699. <td>
  2700. </td>
  2701. <td>qty</td>
  2702. <td>numeric</td>
  2703. <td><i>
  2704. </i>
  2705. </td>
  2706. </tr>
  2707. <tr class="tr1">
  2708. <td>
  2709. </td>
  2710. <td>shippingdate</td>
  2711. <td>date</td>
  2712. <td><i>
  2713. </i>
  2714. </td>
  2715. </tr>
  2716. <tr class="tr0">
  2717. <td>
  2718. <a href="#public.table.person">person.id</a>
  2719. </td>
  2720. <td>person_id</td>
  2721. <td>integer</td>
  2722. <td><i>
  2723. NOT NULL
  2724. </i>
  2725. </td>
  2726. </tr>
  2727. <tr class="tr1">
  2728. <td>
  2729. </td>
  2730. <td>entry_id</td>
  2731. <td>serial</td>
  2732. <td><i>
  2733. PRIMARY KEY
  2734. </i>
  2735. </td>
  2736. </tr>
  2737. </table>
  2738. <!-- Inherits -->
  2739. <!-- Constraint List -->
  2740. <!-- Foreign Key Discovery -->
  2741. <!-- Indexes -->
  2742. <!-- View Definition -->
  2743. <!-- List off permissions -->
  2744. <p>
  2745. <a href="#index">Index</a> -
  2746. <a href="#public.schema">Schema public</a>
  2747. </p>
  2748. <hr>
  2749. <h2>Table:
  2750. <a name="public.table.invoice">invoice</a>
  2751. </h2>
  2752. <table width="100%" cellspacing="0" cellpadding="3">
  2753. <caption>invoice Structure</caption>
  2754. <tr>
  2755. <th>F-Key</th>
  2756. <th>Name</th>
  2757. <th>Type</th>
  2758. <th>Description</th>
  2759. </tr>
  2760. <tr class="tr0">
  2761. <td>
  2762. </td>
  2763. <td>id</td>
  2764. <td>serial</td>
  2765. <td><i>
  2766. PRIMARY KEY
  2767. </i>
  2768. </td>
  2769. </tr>
  2770. <tr class="tr1">
  2771. <td>
  2772. </td>
  2773. <td>trans_id</td>
  2774. <td>integer</td>
  2775. <td><i>
  2776. </i>
  2777. </td>
  2778. </tr>
  2779. <tr class="tr0">
  2780. <td>
  2781. </td>
  2782. <td>parts_id</td>
  2783. <td>integer</td>
  2784. <td><i>
  2785. </i>
  2786. </td>
  2787. </tr>
  2788. <tr class="tr1">
  2789. <td>
  2790. </td>
  2791. <td>description</td>
  2792. <td>text</td>
  2793. <td><i>
  2794. </i>
  2795. </td>
  2796. </tr>
  2797. <tr class="tr0">
  2798. <td>
  2799. </td>
  2800. <td>qty</td>
  2801. <td>integer</td>
  2802. <td><i>
  2803. </i>
  2804. </td>
  2805. </tr>
  2806. <tr class="tr1">
  2807. <td>
  2808. </td>
  2809. <td>allocated</td>
  2810. <td>integer</td>
  2811. <td><i>
  2812. </i>
  2813. </td>
  2814. </tr>
  2815. <tr class="tr0">
  2816. <td>
  2817. </td>
  2818. <td>sellprice</td>
  2819. <td>numeric</td>
  2820. <td><i>
  2821. </i>
  2822. </td>
  2823. </tr>
  2824. <tr class="tr1">
  2825. <td>
  2826. </td>
  2827. <td>fxsellprice</td>
  2828. <td>numeric</td>
  2829. <td><i>
  2830. </i>
  2831. </td>
  2832. </tr>
  2833. <tr class="tr0">
  2834. <td>
  2835. </td>
  2836. <td>discount</td>
  2837. <td>real</td>
  2838. <td><i>
  2839. </i>
  2840. </td>
  2841. </tr>
  2842. <tr class="tr1">
  2843. <td>
  2844. </td>
  2845. <td>assemblyitem</td>
  2846. <td>boolean</td>
  2847. <td><i>
  2848. DEFAULT false
  2849. </i>
  2850. </td>
  2851. </tr>
  2852. <tr class="tr0">
  2853. <td>
  2854. </td>
  2855. <td>unit</td>
  2856. <td>character varying(5)</td>
  2857. <td><i>
  2858. </i>
  2859. </td>
  2860. </tr>
  2861. <tr class="tr1">
  2862. <td>
  2863. </td>
  2864. <td>project_id</td>
  2865. <td>integer</td>
  2866. <td><i>
  2867. </i>
  2868. </td>
  2869. </tr>
  2870. <tr class="tr0">
  2871. <td>
  2872. </td>
  2873. <td>deliverydate</td>
  2874. <td>date</td>
  2875. <td><i>
  2876. </i>
  2877. </td>
  2878. </tr>
  2879. <tr class="tr1">
  2880. <td>
  2881. </td>
  2882. <td>serialnumber</td>
  2883. <td>text</td>
  2884. <td><i>
  2885. </i>
  2886. </td>
  2887. </tr>
  2888. <tr class="tr0">
  2889. <td>
  2890. </td>
  2891. <td>notes</td>
  2892. <td>text</td>
  2893. <td><i>
  2894. </i>
  2895. </td>
  2896. </tr>
  2897. </table>
  2898. <!-- Inherits -->
  2899. <!-- Constraint List -->
  2900. <!-- Foreign Key Discovery -->
  2901. <!-- Indexes -->
  2902. invoice_id_key id
  2903. invoice_trans_id_key trans_id
  2904. <!-- View Definition -->
  2905. <!-- List off permissions -->
  2906. <p>
  2907. <a href="#index">Index</a> -
  2908. <a href="#public.schema">Schema public</a>
  2909. </p>
  2910. <hr>
  2911. <h2>Table:
  2912. <a name="public.table.jcitems">jcitems</a>
  2913. </h2>
  2914. <table width="100%" cellspacing="0" cellpadding="3">
  2915. <caption>jcitems Structure</caption>
  2916. <tr>
  2917. <th>F-Key</th>
  2918. <th>Name</th>
  2919. <th>Type</th>
  2920. <th>Description</th>
  2921. </tr>
  2922. <tr class="tr0">
  2923. <td>
  2924. </td>
  2925. <td>id</td>
  2926. <td>serial</td>
  2927. <td><i>
  2928. PRIMARY KEY
  2929. </i>
  2930. </td>
  2931. </tr>
  2932. <tr class="tr1">
  2933. <td>
  2934. </td>
  2935. <td>project_id</td>
  2936. <td>integer</td>
  2937. <td><i>
  2938. </i>
  2939. </td>
  2940. </tr>
  2941. <tr class="tr0">
  2942. <td>
  2943. </td>
  2944. <td>parts_id</td>
  2945. <td>integer</td>
  2946. <td><i>
  2947. </i>
  2948. </td>
  2949. </tr>
  2950. <tr class="tr1">
  2951. <td>
  2952. </td>
  2953. <td>description</td>
  2954. <td>text</td>
  2955. <td><i>
  2956. </i>
  2957. </td>
  2958. </tr>
  2959. <tr class="tr0">
  2960. <td>
  2961. </td>
  2962. <td>qty</td>
  2963. <td>numeric</td>
  2964. <td><i>
  2965. </i>
  2966. </td>
  2967. </tr>
  2968. <tr class="tr1">
  2969. <td>
  2970. </td>
  2971. <td>allocated</td>
  2972. <td>numeric</td>
  2973. <td><i>
  2974. </i>
  2975. </td>
  2976. </tr>
  2977. <tr class="tr0">
  2978. <td>
  2979. </td>
  2980. <td>sellprice</td>
  2981. <td>numeric</td>
  2982. <td><i>
  2983. </i>
  2984. </td>
  2985. </tr>
  2986. <tr class="tr1">
  2987. <td>
  2988. </td>
  2989. <td>fxsellprice</td>
  2990. <td>numeric</td>
  2991. <td><i>
  2992. </i>
  2993. </td>
  2994. </tr>
  2995. <tr class="tr0">
  2996. <td>
  2997. </td>
  2998. <td>serialnumber</td>
  2999. <td>text</td>
  3000. <td><i>
  3001. </i>
  3002. </td>
  3003. </tr>
  3004. <tr class="tr1">
  3005. <td>
  3006. </td>
  3007. <td>checkedin</td>
  3008. <td>timestamp with time zone</td>
  3009. <td><i>
  3010. </i>
  3011. </td>
  3012. </tr>
  3013. <tr class="tr0">
  3014. <td>
  3015. </td>
  3016. <td>checkedout</td>
  3017. <td>timestamp with time zone</td>
  3018. <td><i>
  3019. </i>
  3020. </td>
  3021. </tr>
  3022. <tr class="tr1">
  3023. <td>
  3024. <a href="#public.table.person">person.id</a>
  3025. </td>
  3026. <td>person_id</td>
  3027. <td>integer</td>
  3028. <td><i>
  3029. NOT NULL
  3030. </i>
  3031. </td>
  3032. </tr>
  3033. <tr class="tr0">
  3034. <td>
  3035. </td>
  3036. <td>notes</td>
  3037. <td>text</td>
  3038. <td><i>
  3039. </i>
  3040. </td>
  3041. </tr>
  3042. </table>
  3043. <!-- Inherits -->
  3044. <!-- Constraint List -->
  3045. <!-- Foreign Key Discovery -->
  3046. <!-- Indexes -->
  3047. jcitems_id_key id
  3048. <!-- View Definition -->
  3049. <!-- List off permissions -->
  3050. <p>
  3051. <a href="#index">Index</a> -
  3052. <a href="#public.schema">Schema public</a>
  3053. </p>
  3054. <hr>
  3055. <h2>Table:
  3056. <a name="public.table.language">language</a>
  3057. </h2>
  3058. <table width="100%" cellspacing="0" cellpadding="3">
  3059. <caption>language Structure</caption>
  3060. <tr>
  3061. <th>F-Key</th>
  3062. <th>Name</th>
  3063. <th>Type</th>
  3064. <th>Description</th>
  3065. </tr>
  3066. <tr class="tr0">
  3067. <td>
  3068. </td>
  3069. <td>code</td>
  3070. <td>character varying(6)</td>
  3071. <td><i>
  3072. PRIMARY KEY
  3073. </i>
  3074. </td>
  3075. </tr>
  3076. <tr class="tr1">
  3077. <td>
  3078. </td>
  3079. <td>description</td>
  3080. <td>text</td>
  3081. <td><i>
  3082. </i>
  3083. </td>
  3084. </tr>
  3085. </table>
  3086. <!-- Inherits -->
  3087. <!-- Constraint List -->
  3088. <!-- Foreign Key Discovery -->
  3089. <!-- Indexes -->
  3090. <!-- View Definition -->
  3091. <!-- List off permissions -->
  3092. <p>
  3093. <a href="#index">Index</a> -
  3094. <a href="#public.schema">Schema public</a>
  3095. </p>
  3096. <hr>
  3097. <h2>Table:
  3098. <a name="public.table.location">location</a>
  3099. </h2>
  3100. <table width="100%" cellspacing="0" cellpadding="3">
  3101. <caption>location Structure</caption>
  3102. <tr>
  3103. <th>F-Key</th>
  3104. <th>Name</th>
  3105. <th>Type</th>
  3106. <th>Description</th>
  3107. </tr>
  3108. <tr class="tr0">
  3109. <td>
  3110. </td>
  3111. <td>id</td>
  3112. <td>serial</td>
  3113. <td><i>
  3114. PRIMARY KEY
  3115. </i>
  3116. </td>
  3117. </tr>
  3118. <tr class="tr1">
  3119. <td>
  3120. </td>
  3121. <td>line_one</td>
  3122. <td>text</td>
  3123. <td><i>
  3124. NOT NULL
  3125. </i>
  3126. </td>
  3127. </tr>
  3128. <tr class="tr0">
  3129. <td>
  3130. </td>
  3131. <td>line_two</td>
  3132. <td>text</td>
  3133. <td><i>
  3134. </i>
  3135. </td>
  3136. </tr>
  3137. <tr class="tr1">
  3138. <td>
  3139. </td>
  3140. <td>line_three</td>
  3141. <td>text</td>
  3142. <td><i>
  3143. </i>
  3144. </td>
  3145. </tr>
  3146. <tr class="tr0">
  3147. <td>
  3148. </td>
  3149. <td>city_province</td>
  3150. <td>text</td>
  3151. <td><i>
  3152. NOT NULL
  3153. </i>
  3154. </td>
  3155. </tr>
  3156. <tr class="tr1">
  3157. <td>
  3158. <a href="#public.table.country">country.id</a>
  3159. </td>
  3160. <td>country_id</td>
  3161. <td>integer</td>
  3162. <td><i>
  3163. NOT NULL
  3164. </i>
  3165. </td>
  3166. </tr>
  3167. <tr class="tr0">
  3168. <td>
  3169. </td>
  3170. <td>mail_code</td>
  3171. <td>text</td>
  3172. <td><i>
  3173. NOT NULL
  3174. </i>
  3175. </td>
  3176. </tr>
  3177. </table>
  3178. <!-- Inherits -->
  3179. <!-- Constraint List -->
  3180. <p>&nbsp;</p>
  3181. <table width="100%" cellspacing="0" cellpadding="3">
  3182. <caption>location Constraints</caption>
  3183. <tr>
  3184. <th>Name</th>
  3185. <th>Constraint</th>
  3186. </tr>
  3187. <tr class="tr0">
  3188. <td>location_city_province_check</td>
  3189. <td>CHECK ((city_province ~ &#39;[[:alnum:]_]&#39;::text))</td>
  3190. </tr>
  3191. <tr class="tr1">
  3192. <td>location_line_one_check</td>
  3193. <td>CHECK ((line_one ~ &#39;[[:alnum:]_]&#39;::text))</td>
  3194. </tr>
  3195. <tr class="tr0">
  3196. <td>location_mail_code_check</td>
  3197. <td>CHECK ((mail_code ~ &#39;[[:alnum:]_]&#39;::text))</td>
  3198. </tr>
  3199. </table>
  3200. <!-- Foreign Key Discovery -->
  3201. <p>Tables referencing this one via Foreign Key Constraints:</p>
  3202. <ul>
  3203. <li><a href="#public.table.company">company</a></li>
  3204. </ul>
  3205. <ul>
  3206. <li><a href="#public.table.company-to-location">company_to_location</a></li>
  3207. </ul>
  3208. <ul>
  3209. <li><a href="#public.table.person">person</a></li>
  3210. </ul>
  3211. <ul>
  3212. <li><a href="#public.table.person-to-company">person_to_company</a></li>
  3213. </ul>
  3214. <!-- Indexes -->
  3215. <!-- View Definition -->
  3216. <!-- List off permissions -->
  3217. <p>
  3218. <a href="#index">Index</a> -
  3219. <a href="#public.schema">Schema public</a>
  3220. </p>
  3221. <hr>
  3222. <h2>Table:
  3223. <a name="public.table.makemodel">makemodel</a>
  3224. </h2>
  3225. <table width="100%" cellspacing="0" cellpadding="3">
  3226. <caption>makemodel Structure</caption>
  3227. <tr>
  3228. <th>F-Key</th>
  3229. <th>Name</th>
  3230. <th>Type</th>
  3231. <th>Description</th>
  3232. </tr>
  3233. <tr class="tr0">
  3234. <td>
  3235. </td>
  3236. <td>parts_id</td>
  3237. <td>integer</td>
  3238. <td><i>
  3239. PRIMARY KEY
  3240. </i>
  3241. </td>
  3242. </tr>
  3243. <tr class="tr1">
  3244. <td>
  3245. </td>
  3246. <td>make</td>
  3247. <td>text</td>
  3248. <td><i>
  3249. </i>
  3250. </td>
  3251. </tr>
  3252. <tr class="tr0">
  3253. <td>
  3254. </td>
  3255. <td>model</td>
  3256. <td>text</td>
  3257. <td><i>
  3258. </i>
  3259. </td>
  3260. </tr>
  3261. </table>
  3262. <!-- Inherits -->
  3263. <!-- Constraint List -->
  3264. <!-- Foreign Key Discovery -->
  3265. <!-- Indexes -->
  3266. makemodel_make_key lower(make)
  3267. makemodel_model_key lower(model)
  3268. makemodel_parts_id_key parts_id
  3269. <!-- View Definition -->
  3270. <!-- List off permissions -->
  3271. <p>
  3272. <a href="#index">Index</a> -
  3273. <a href="#public.schema">Schema public</a>
  3274. </p>
  3275. <hr>
  3276. <h2>Table:
  3277. <a name="public.table.oe">oe</a>
  3278. </h2>
  3279. <table width="100%" cellspacing="0" cellpadding="3">
  3280. <caption>oe Structure</caption>
  3281. <tr>
  3282. <th>F-Key</th>
  3283. <th>Name</th>
  3284. <th>Type</th>
  3285. <th>Description</th>
  3286. </tr>
  3287. <tr class="tr0">
  3288. <td>
  3289. </td>
  3290. <td>id</td>
  3291. <td>serial</td>
  3292. <td><i>
  3293. PRIMARY KEY
  3294. </i>
  3295. </td>
  3296. </tr>
  3297. <tr class="tr1">
  3298. <td>
  3299. </td>
  3300. <td>ordnumber</td>
  3301. <td>text</td>
  3302. <td><i>
  3303. </i>
  3304. </td>
  3305. </tr>
  3306. <tr class="tr0">
  3307. <td>
  3308. </td>
  3309. <td>transdate</td>
  3310. <td>date</td>
  3311. <td><i>
  3312. DEFAULT (&#39;now&#39;::text)::date
  3313. </i>
  3314. </td>
  3315. </tr>
  3316. <tr class="tr1">
  3317. <td>
  3318. <a href="#public.table.entity">entity.id</a>
  3319. </td>
  3320. <td>entity_id</td>
  3321. <td>integer</td>
  3322. <td><i>
  3323. NOT NULL
  3324. </i>
  3325. </td>
  3326. </tr>
  3327. <tr class="tr0">
  3328. <td>
  3329. </td>
  3330. <td>amount</td>
  3331. <td>numeric</td>
  3332. <td><i>
  3333. </i>
  3334. </td>
  3335. </tr>
  3336. <tr class="tr1">
  3337. <td>
  3338. </td>
  3339. <td>netamount</td>
  3340. <td>numeric</td>
  3341. <td><i>
  3342. </i>
  3343. </td>
  3344. </tr>
  3345. <tr class="tr0">
  3346. <td>
  3347. </td>
  3348. <td>reqdate</td>
  3349. <td>date</td>
  3350. <td><i>
  3351. </i>
  3352. </td>
  3353. </tr>
  3354. <tr class="tr1">
  3355. <td>
  3356. </td>
  3357. <td>taxincluded</td>
  3358. <td>boolean</td>
  3359. <td><i>
  3360. </i>
  3361. </td>
  3362. </tr>
  3363. <tr class="tr0">
  3364. <td>
  3365. </td>
  3366. <td>shippingpoint</td>
  3367. <td>text</td>
  3368. <td><i>
  3369. </i>
  3370. </td>
  3371. </tr>
  3372. <tr class="tr1">
  3373. <td>
  3374. </td>
  3375. <td>notes</td>
  3376. <td>text</td>
  3377. <td><i>
  3378. </i>
  3379. </td>
  3380. </tr>
  3381. <tr class="tr0">
  3382. <td>
  3383. </td>
  3384. <td>curr</td>
  3385. <td>character(3)</td>
  3386. <td><i>
  3387. </i>
  3388. </td>
  3389. </tr>
  3390. <tr class="tr1">
  3391. <td>
  3392. <a href="#public.table.person">person.id</a>
  3393. </td>
  3394. <td>person_id</td>
  3395. <td>integer</td>
  3396. <td><i>
  3397. NOT NULL
  3398. </i>
  3399. </td>
  3400. </tr>
  3401. <tr class="tr0">
  3402. <td>
  3403. </td>
  3404. <td>closed</td>
  3405. <td>boolean</td>
  3406. <td><i>
  3407. DEFAULT false
  3408. </i>
  3409. </td>
  3410. </tr>
  3411. <tr class="tr1">
  3412. <td>
  3413. </td>
  3414. <td>quotation</td>
  3415. <td>boolean</td>
  3416. <td><i>
  3417. DEFAULT false
  3418. </i>
  3419. </td>
  3420. </tr>
  3421. <tr class="tr0">
  3422. <td>
  3423. </td>
  3424. <td>quonumber</td>
  3425. <td>text</td>
  3426. <td><i>
  3427. </i>
  3428. </td>
  3429. </tr>
  3430. <tr class="tr1">
  3431. <td>
  3432. </td>
  3433. <td>intnotes</td>
  3434. <td>text</td>
  3435. <td><i>
  3436. </i>
  3437. </td>
  3438. </tr>
  3439. <tr class="tr0">
  3440. <td>
  3441. </td>
  3442. <td>department_id</td>
  3443. <td>integer</td>
  3444. <td><i>
  3445. </i>
  3446. </td>
  3447. </tr>
  3448. <tr class="tr1">
  3449. <td>
  3450. </td>
  3451. <td>shipvia</td>
  3452. <td>text</td>
  3453. <td><i>
  3454. </i>
  3455. </td>
  3456. </tr>
  3457. <tr class="tr0">
  3458. <td>
  3459. </td>
  3460. <td>language_code</td>
  3461. <td>character varying(6)</td>
  3462. <td><i>
  3463. </i>
  3464. </td>
  3465. </tr>
  3466. <tr class="tr1">
  3467. <td>
  3468. </td>
  3469. <td>ponumber</td>
  3470. <td>text</td>
  3471. <td><i>
  3472. </i>
  3473. </td>
  3474. </tr>
  3475. <tr class="tr0">
  3476. <td>
  3477. </td>
  3478. <td>terms</td>
  3479. <td>smallint</td>
  3480. <td><i>
  3481. </i>
  3482. </td>
  3483. </tr>
  3484. <tr class="tr1">
  3485. <td>
  3486. <a href="#public.table.oe-class">oe_class.id</a>
  3487. </td>
  3488. <td>oe_class_id</td>
  3489. <td>integer</td>
  3490. <td><i>
  3491. NOT NULL
  3492. </i>
  3493. </td>
  3494. </tr>
  3495. </table>
  3496. <!-- Inherits -->
  3497. <!-- Constraint List -->
  3498. <!-- Foreign Key Discovery -->
  3499. <!-- Indexes -->
  3500. oe_id_key id
  3501. oe_ordnumber_key ordnumber
  3502. oe_transdate_key transdate
  3503. <!-- View Definition -->
  3504. <!-- List off permissions -->
  3505. <p>
  3506. <a href="#index">Index</a> -
  3507. <a href="#public.schema">Schema public</a>
  3508. </p>
  3509. <hr>
  3510. <h2>Table:
  3511. <a name="public.table.oe-class">oe_class</a>
  3512. </h2>
  3513. <p> This could probably be done better. But I need to remove the customer_id/vendor_id relationship and instead rely on a classification </p>
  3514. <table width="100%" cellspacing="0" cellpadding="3">
  3515. <caption>oe_class Structure</caption>
  3516. <tr>
  3517. <th>F-Key</th>
  3518. <th>Name</th>
  3519. <th>Type</th>
  3520. <th>Description</th>
  3521. </tr>
  3522. <tr class="tr0">
  3523. <td>
  3524. </td>
  3525. <td>id</td>
  3526. <td>smallint</td>
  3527. <td><i>
  3528. UNIQUE
  3529. </i>
  3530. </td>
  3531. </tr>
  3532. <tr class="tr1">
  3533. <td>
  3534. </td>
  3535. <td>oe_class</td>
  3536. <td>text</td>
  3537. <td><i>
  3538. PRIMARY KEY
  3539. </i>
  3540. </td>
  3541. </tr>
  3542. </table>
  3543. <!-- Inherits -->
  3544. <!-- Constraint List -->
  3545. <p>&nbsp;</p>
  3546. <table width="100%" cellspacing="0" cellpadding="3">
  3547. <caption>oe_class Constraints</caption>
  3548. <tr>
  3549. <th>Name</th>
  3550. <th>Constraint</th>
  3551. </tr>
  3552. <tr class="tr0">
  3553. <td>oe_class_id_check</td>
  3554. <td>CHECK (((id = 1) OR (id = 2)))</td>
  3555. </tr>
  3556. </table>
  3557. <!-- Foreign Key Discovery -->
  3558. <p>Tables referencing this one via Foreign Key Constraints:</p>
  3559. <ul>
  3560. <li><a href="#public.table.oe">oe</a></li>
  3561. </ul>
  3562. <!-- Indexes -->
  3563. <!-- View Definition -->
  3564. <!-- List off permissions -->
  3565. <p>
  3566. <a href="#index">Index</a> -
  3567. <a href="#public.schema">Schema public</a>
  3568. </p>
  3569. <hr>
  3570. <h2>Table:
  3571. <a name="public.table.orderitems">orderitems</a>
  3572. </h2>
  3573. <table width="100%" cellspacing="0" cellpadding="3">
  3574. <caption>orderitems Structure</caption>
  3575. <tr>
  3576. <th>F-Key</th>
  3577. <th>Name</th>
  3578. <th>Type</th>
  3579. <th>Description</th>
  3580. </tr>
  3581. <tr class="tr0">
  3582. <td>
  3583. </td>
  3584. <td>id</td>
  3585. <td>serial</td>
  3586. <td><i>
  3587. PRIMARY KEY
  3588. </i>
  3589. </td>
  3590. </tr>
  3591. <tr class="tr1">
  3592. <td>
  3593. </td>
  3594. <td>trans_id</td>
  3595. <td>integer</td>
  3596. <td><i>
  3597. </i>
  3598. </td>
  3599. </tr>
  3600. <tr class="tr0">
  3601. <td>
  3602. </td>
  3603. <td>parts_id</td>
  3604. <td>integer</td>
  3605. <td><i>
  3606. </i>
  3607. </td>
  3608. </tr>
  3609. <tr class="tr1">
  3610. <td>
  3611. </td>
  3612. <td>description</td>
  3613. <td>text</td>
  3614. <td><i>
  3615. </i>
  3616. </td>
  3617. </tr>
  3618. <tr class="tr0">
  3619. <td>
  3620. </td>
  3621. <td>qty</td>
  3622. <td>numeric</td>
  3623. <td><i>
  3624. </i>
  3625. </td>
  3626. </tr>
  3627. <tr class="tr1">
  3628. <td>
  3629. </td>
  3630. <td>sellprice</td>
  3631. <td>numeric</td>
  3632. <td><i>
  3633. </i>
  3634. </td>
  3635. </tr>
  3636. <tr class="tr0">
  3637. <td>
  3638. </td>
  3639. <td>discount</td>
  3640. <td>numeric</td>
  3641. <td><i>
  3642. </i>
  3643. </td>
  3644. </tr>
  3645. <tr class="tr1">
  3646. <td>
  3647. </td>
  3648. <td>unit</td>
  3649. <td>character varying(5)</td>
  3650. <td><i>
  3651. </i>
  3652. </td>
  3653. </tr>
  3654. <tr class="tr0">
  3655. <td>
  3656. </td>
  3657. <td>project_id</td>
  3658. <td>integer</td>
  3659. <td><i>
  3660. </i>
  3661. </td>
  3662. </tr>
  3663. <tr class="tr1">
  3664. <td>
  3665. </td>
  3666. <td>reqdate</td>
  3667. <td>date</td>
  3668. <td><i>
  3669. </i>
  3670. </td>
  3671. </tr>
  3672. <tr class="tr0">
  3673. <td>
  3674. </td>
  3675. <td>ship</td>
  3676. <td>numeric</td>
  3677. <td><i>
  3678. </i>
  3679. </td>
  3680. </tr>
  3681. <tr class="tr1">
  3682. <td>
  3683. </td>
  3684. <td>serialnumber</td>
  3685. <td>text</td>
  3686. <td><i>
  3687. </i>
  3688. </td>
  3689. </tr>
  3690. <tr class="tr0">
  3691. <td>
  3692. </td>
  3693. <td>notes</td>
  3694. <td>text</td>
  3695. <td><i>
  3696. </i>
  3697. </td>
  3698. </tr>
  3699. </table>
  3700. <!-- Inherits -->
  3701. <!-- Constraint List -->
  3702. <!-- Foreign Key Discovery -->
  3703. <!-- Indexes -->
  3704. orderitems_id_key id
  3705. orderitems_trans_id_key trans_id
  3706. <!-- View Definition -->
  3707. <!-- List off permissions -->
  3708. <p>
  3709. <a href="#index">Index</a> -
  3710. <a href="#public.schema">Schema public</a>
  3711. </p>
  3712. <hr>
  3713. <h2>Table:
  3714. <a name="public.table.parts">parts</a>
  3715. </h2>
  3716. <table width="100%" cellspacing="0" cellpadding="3">
  3717. <caption>parts Structure</caption>
  3718. <tr>
  3719. <th>F-Key</th>
  3720. <th>Name</th>
  3721. <th>Type</th>
  3722. <th>Description</th>
  3723. </tr>
  3724. <tr class="tr0">
  3725. <td>
  3726. </td>
  3727. <td>id</td>
  3728. <td>serial</td>
  3729. <td><i>
  3730. PRIMARY KEY
  3731. </i>
  3732. </td>
  3733. </tr>
  3734. <tr class="tr1">
  3735. <td>
  3736. </td>
  3737. <td>partnumber</td>
  3738. <td>text</td>
  3739. <td><i>
  3740. </i>
  3741. </td>
  3742. </tr>
  3743. <tr class="tr0">
  3744. <td>
  3745. </td>
  3746. <td>description</td>
  3747. <td>text</td>
  3748. <td><i>
  3749. </i>
  3750. </td>
  3751. </tr>
  3752. <tr class="tr1">
  3753. <td>
  3754. </td>
  3755. <td>unit</td>
  3756. <td>character varying(5)</td>
  3757. <td><i>
  3758. </i>
  3759. </td>
  3760. </tr>
  3761. <tr class="tr0">
  3762. <td>
  3763. </td>
  3764. <td>listprice</td>
  3765. <td>numeric</td>
  3766. <td><i>
  3767. </i>
  3768. </td>
  3769. </tr>
  3770. <tr class="tr1">
  3771. <td>
  3772. </td>
  3773. <td>sellprice</td>
  3774. <td>numeric</td>
  3775. <td><i>
  3776. </i>
  3777. </td>
  3778. </tr>
  3779. <tr class="tr0">
  3780. <td>
  3781. </td>
  3782. <td>lastcost</td>
  3783. <td>numeric</td>
  3784. <td><i>
  3785. </i>
  3786. </td>
  3787. </tr>
  3788. <tr class="tr1">
  3789. <td>
  3790. </td>
  3791. <td>priceupdate</td>
  3792. <td>date</td>
  3793. <td><i>
  3794. DEFAULT (&#39;now&#39;::text)::date
  3795. </i>
  3796. </td>
  3797. </tr>
  3798. <tr class="tr0">
  3799. <td>
  3800. </td>
  3801. <td>weight</td>
  3802. <td>numeric</td>
  3803. <td><i>
  3804. </i>
  3805. </td>
  3806. </tr>
  3807. <tr class="tr1">
  3808. <td>
  3809. </td>
  3810. <td>onhand</td>
  3811. <td>numeric</td>
  3812. <td><i>
  3813. </i>
  3814. </td>
  3815. </tr>
  3816. <tr class="tr0">
  3817. <td>
  3818. </td>
  3819. <td>notes</td>
  3820. <td>text</td>
  3821. <td><i>
  3822. </i>
  3823. </td>
  3824. </tr>
  3825. <tr class="tr1">
  3826. <td>
  3827. </td>
  3828. <td>makemodel</td>
  3829. <td>boolean</td>
  3830. <td><i>
  3831. DEFAULT false
  3832. </i>
  3833. </td>
  3834. </tr>
  3835. <tr class="tr0">
  3836. <td>
  3837. </td>
  3838. <td>assembly</td>
  3839. <td>boolean</td>
  3840. <td><i>
  3841. DEFAULT false
  3842. </i>
  3843. </td>
  3844. </tr>
  3845. <tr class="tr1">
  3846. <td>
  3847. </td>
  3848. <td>alternate</td>
  3849. <td>boolean</td>
  3850. <td><i>
  3851. DEFAULT false
  3852. </i>
  3853. </td>
  3854. </tr>
  3855. <tr class="tr0">
  3856. <td>
  3857. </td>
  3858. <td>rop</td>
  3859. <td>real</td>
  3860. <td><i>
  3861. </i>
  3862. </td>
  3863. </tr>
  3864. <tr class="tr1">
  3865. <td>
  3866. </td>
  3867. <td>inventory_accno_id</td>
  3868. <td>integer</td>
  3869. <td><i>
  3870. </i>
  3871. </td>
  3872. </tr>
  3873. <tr class="tr0">
  3874. <td>
  3875. </td>
  3876. <td>income_accno_id</td>
  3877. <td>integer</td>
  3878. <td><i>
  3879. </i>
  3880. </td>
  3881. </tr>
  3882. <tr class="tr1">
  3883. <td>
  3884. </td>
  3885. <td>expense_accno_id</td>
  3886. <td>integer</td>
  3887. <td><i>
  3888. </i>
  3889. </td>
  3890. </tr>
  3891. <tr class="tr0">
  3892. <td>
  3893. </td>
  3894. <td>bin</td>
  3895. <td>text</td>
  3896. <td><i>
  3897. </i>
  3898. </td>
  3899. </tr>
  3900. <tr class="tr1">
  3901. <td>
  3902. </td>
  3903. <td>obsolete</td>
  3904. <td>boolean</td>
  3905. <td><i>
  3906. DEFAULT false
  3907. </i>
  3908. </td>
  3909. </tr>
  3910. <tr class="tr0">
  3911. <td>
  3912. </td>
  3913. <td>bom</td>
  3914. <td>boolean</td>
  3915. <td><i>
  3916. DEFAULT false
  3917. </i>
  3918. </td>
  3919. </tr>
  3920. <tr class="tr1">
  3921. <td>
  3922. </td>
  3923. <td>image</td>
  3924. <td>text</td>
  3925. <td><i>
  3926. </i>
  3927. </td>
  3928. </tr>
  3929. <tr class="tr0">
  3930. <td>
  3931. </td>
  3932. <td>drawing</td>
  3933. <td>text</td>
  3934. <td><i>
  3935. </i>
  3936. </td>
  3937. </tr>
  3938. <tr class="tr1">
  3939. <td>
  3940. </td>
  3941. <td>microfiche</td>
  3942. <td>text</td>
  3943. <td><i>
  3944. </i>
  3945. </td>
  3946. </tr>
  3947. <tr class="tr0">
  3948. <td>
  3949. </td>
  3950. <td>partsgroup_id</td>
  3951. <td>integer</td>
  3952. <td><i>
  3953. </i>
  3954. </td>
  3955. </tr>
  3956. <tr class="tr1">
  3957. <td>
  3958. </td>
  3959. <td>project_id</td>
  3960. <td>integer</td>
  3961. <td><i>
  3962. </i>
  3963. </td>
  3964. </tr>
  3965. <tr class="tr0">
  3966. <td>
  3967. </td>
  3968. <td>avgcost</td>
  3969. <td>numeric</td>
  3970. <td><i>
  3971. </i>
  3972. </td>
  3973. </tr>
  3974. </table>
  3975. <!-- Inherits -->
  3976. <!-- Constraint List -->
  3977. <!-- Foreign Key Discovery -->
  3978. <p>Tables referencing this one via Foreign Key Constraints:</p>
  3979. <ul>
  3980. <li><a href="#public.table.partstax">partstax</a></li>
  3981. </ul>
  3982. <!-- Indexes -->
  3983. parts_description_key lower(description)
  3984. parts_id_key id
  3985. parts_partnumber_key lower(partnumber)
  3986. <!-- View Definition -->
  3987. <!-- List off permissions -->
  3988. <p>
  3989. <a href="#index">Index</a> -
  3990. <a href="#public.schema">Schema public</a>
  3991. </p>
  3992. <hr>
  3993. <h2>Table:
  3994. <a name="public.table.partscustomer">partscustomer</a>
  3995. </h2>
  3996. <table width="100%" cellspacing="0" cellpadding="3">
  3997. <caption>partscustomer Structure</caption>
  3998. <tr>
  3999. <th>F-Key</th>
  4000. <th>Name</th>
  4001. <th>Type</th>
  4002. <th>Description</th>
  4003. </tr>
  4004. <tr class="tr0">
  4005. <td>
  4006. </td>
  4007. <td>parts_id</td>
  4008. <td>integer</td>
  4009. <td><i>
  4010. </i>
  4011. </td>
  4012. </tr>
  4013. <tr class="tr1">
  4014. <td>
  4015. </td>
  4016. <td>customer_id</td>
  4017. <td>integer</td>
  4018. <td><i>
  4019. </i>
  4020. </td>
  4021. </tr>
  4022. <tr class="tr0">
  4023. <td>
  4024. </td>
  4025. <td>pricegroup_id</td>
  4026. <td>integer</td>
  4027. <td><i>
  4028. </i>
  4029. </td>
  4030. </tr>
  4031. <tr class="tr1">
  4032. <td>
  4033. </td>
  4034. <td>pricebreak</td>
  4035. <td>numeric</td>
  4036. <td><i>
  4037. </i>
  4038. </td>
  4039. </tr>
  4040. <tr class="tr0">
  4041. <td>
  4042. </td>
  4043. <td>sellprice</td>
  4044. <td>numeric</td>
  4045. <td><i>
  4046. </i>
  4047. </td>
  4048. </tr>
  4049. <tr class="tr1">
  4050. <td>
  4051. </td>
  4052. <td>validfrom</td>
  4053. <td>date</td>
  4054. <td><i>
  4055. </i>
  4056. </td>
  4057. </tr>
  4058. <tr class="tr0">
  4059. <td>
  4060. </td>
  4061. <td>validto</td>
  4062. <td>date</td>
  4063. <td><i>
  4064. </i>
  4065. </td>
  4066. </tr>
  4067. <tr class="tr1">
  4068. <td>
  4069. </td>
  4070. <td>curr</td>
  4071. <td>character(3)</td>
  4072. <td><i>
  4073. </i>
  4074. </td>
  4075. </tr>
  4076. <tr class="tr0">
  4077. <td>
  4078. </td>
  4079. <td>entry_id</td>
  4080. <td>serial</td>
  4081. <td><i>
  4082. PRIMARY KEY
  4083. </i>
  4084. </td>
  4085. </tr>
  4086. </table>
  4087. <!-- Inherits -->
  4088. <!-- Constraint List -->
  4089. <!-- Foreign Key Discovery -->
  4090. <!-- Indexes -->
  4091. <!-- View Definition -->
  4092. <!-- List off permissions -->
  4093. <p>
  4094. <a href="#index">Index</a> -
  4095. <a href="#public.schema">Schema public</a>
  4096. </p>
  4097. <hr>
  4098. <h2>Table:
  4099. <a name="public.table.partsgroup">partsgroup</a>
  4100. </h2>
  4101. <table width="100%" cellspacing="0" cellpadding="3">
  4102. <caption>partsgroup Structure</caption>
  4103. <tr>
  4104. <th>F-Key</th>
  4105. <th>Name</th>
  4106. <th>Type</th>
  4107. <th>Description</th>
  4108. </tr>
  4109. <tr class="tr0">
  4110. <td>
  4111. </td>
  4112. <td>id</td>
  4113. <td>serial</td>
  4114. <td><i>
  4115. PRIMARY KEY
  4116. </i>
  4117. </td>
  4118. </tr>
  4119. <tr class="tr1">
  4120. <td>
  4121. </td>
  4122. <td>partsgroup</td>
  4123. <td>text</td>
  4124. <td><i>
  4125. </i>
  4126. </td>
  4127. </tr>
  4128. </table>
  4129. <!-- Inherits -->
  4130. <!-- Constraint List -->
  4131. <!-- Foreign Key Discovery -->
  4132. <!-- Indexes -->
  4133. partsgroup_id_key id
  4134. <!-- View Definition -->
  4135. <!-- List off permissions -->
  4136. <p>
  4137. <a href="#index">Index</a> -
  4138. <a href="#public.schema">Schema public</a>
  4139. </p>
  4140. <hr>
  4141. <h2>Table:
  4142. <a name="public.table.partstax">partstax</a>
  4143. </h2>
  4144. <table width="100%" cellspacing="0" cellpadding="3">
  4145. <caption>partstax Structure</caption>
  4146. <tr>
  4147. <th>F-Key</th>
  4148. <th>Name</th>
  4149. <th>Type</th>
  4150. <th>Description</th>
  4151. </tr>
  4152. <tr class="tr0">
  4153. <td>
  4154. <a href="#public.table.parts">parts.id</a>
  4155. </td>
  4156. <td>parts_id</td>
  4157. <td>integer</td>
  4158. <td><i>
  4159. PRIMARY KEY
  4160. </i>
  4161. </td>
  4162. </tr>
  4163. <tr class="tr1">
  4164. <td>
  4165. <a href="#public.table.chart">chart.id</a>
  4166. </td>
  4167. <td>chart_id</td>
  4168. <td>integer</td>
  4169. <td><i>
  4170. PRIMARY KEY
  4171. </i>
  4172. </td>
  4173. </tr>
  4174. <tr class="tr0">
  4175. <td>
  4176. <a href="#public.table.taxcategory">taxcategory.taxcategory_id</a>
  4177. </td>
  4178. <td>taxcategory_id</td>
  4179. <td>integer</td>
  4180. <td><i>
  4181. </i>
  4182. </td>
  4183. </tr>
  4184. </table>
  4185. <!-- Inherits -->
  4186. <!-- Constraint List -->
  4187. <!-- Foreign Key Discovery -->
  4188. <!-- Indexes -->
  4189. partstax_parts_id_key parts_id
  4190. <!-- View Definition -->
  4191. <!-- List off permissions -->
  4192. <p>
  4193. <a href="#index">Index</a> -
  4194. <a href="#public.schema">Schema public</a>
  4195. </p>
  4196. <hr>
  4197. <h2>Table:
  4198. <a name="public.table.partsvendor">partsvendor</a>
  4199. </h2>
  4200. <table width="100%" cellspacing="0" cellpadding="3">
  4201. <caption>partsvendor Structure</caption>
  4202. <tr>
  4203. <th>F-Key</th>
  4204. <th>Name</th>
  4205. <th>Type</th>
  4206. <th>Description</th>
  4207. </tr>
  4208. <tr class="tr0">
  4209. <td>
  4210. <a href="#public.table.entity">entity.id</a>
  4211. </td>
  4212. <td>entity_id</td>
  4213. <td>integer</td>
  4214. <td><i>
  4215. NOT NULL
  4216. </i>
  4217. </td>
  4218. </tr>
  4219. <tr class="tr1">
  4220. <td>
  4221. </td>
  4222. <td>parts_id</td>
  4223. <td>integer</td>
  4224. <td><i>
  4225. </i>
  4226. </td>
  4227. </tr>
  4228. <tr class="tr0">
  4229. <td>
  4230. </td>
  4231. <td>partnumber</td>
  4232. <td>text</td>
  4233. <td><i>
  4234. </i>
  4235. </td>
  4236. </tr>
  4237. <tr class="tr1">
  4238. <td>
  4239. </td>
  4240. <td>leadtime</td>
  4241. <td>smallint</td>
  4242. <td><i>
  4243. </i>
  4244. </td>
  4245. </tr>
  4246. <tr class="tr0">
  4247. <td>
  4248. </td>
  4249. <td>lastcost</td>
  4250. <td>numeric</td>
  4251. <td><i>
  4252. </i>
  4253. </td>
  4254. </tr>
  4255. <tr class="tr1">
  4256. <td>
  4257. </td>
  4258. <td>curr</td>
  4259. <td>character(3)</td>
  4260. <td><i>
  4261. </i>
  4262. </td>
  4263. </tr>
  4264. <tr class="tr0">
  4265. <td>
  4266. </td>
  4267. <td>entry_id</td>
  4268. <td>serial</td>
  4269. <td><i>
  4270. PRIMARY KEY
  4271. </i>
  4272. </td>
  4273. </tr>
  4274. </table>
  4275. <!-- Inherits -->
  4276. <!-- Constraint List -->
  4277. <!-- Foreign Key Discovery -->
  4278. <!-- Indexes -->
  4279. partsvendor_parts_id_key parts_id
  4280. <!-- View Definition -->
  4281. <!-- List off permissions -->
  4282. <p>
  4283. <a href="#index">Index</a> -
  4284. <a href="#public.schema">Schema public</a>
  4285. </p>
  4286. <hr>
  4287. <h2>Table:
  4288. <a name="public.table.person">person</a>
  4289. </h2>
  4290. <p> Every person, must have an entity to derive a common or display name. The correct way to get class information on a person would be person.entity_id-&gt;entity_class_to_entity.entity_id. </p>
  4291. <table width="100%" cellspacing="0" cellpadding="3">
  4292. <caption>person Structure</caption>
  4293. <tr>
  4294. <th>F-Key</th>
  4295. <th>Name</th>
  4296. <th>Type</th>
  4297. <th>Description</th>
  4298. </tr>
  4299. <tr class="tr0">
  4300. <td>
  4301. </td>
  4302. <td>id</td>
  4303. <td>serial</td>
  4304. <td><i>
  4305. PRIMARY KEY
  4306. </i>
  4307. </td>
  4308. </tr>
  4309. <tr class="tr1">
  4310. <td>
  4311. <a href="#public.table.entity">entity.id</a>
  4312. </td>
  4313. <td>entity_id</td>
  4314. <td>integer</td>
  4315. <td><i>
  4316. NOT NULL
  4317. </i>
  4318. </td>
  4319. </tr>
  4320. <tr class="tr0">
  4321. <td>
  4322. <a href="#public.table.salutation">salutation.id</a>
  4323. </td>
  4324. <td>salutation_id</td>
  4325. <td>integer</td>
  4326. <td><i>
  4327. </i>
  4328. </td>
  4329. </tr>
  4330. <tr class="tr1">
  4331. <td>
  4332. </td>
  4333. <td>first_name</td>
  4334. <td>text</td>
  4335. <td><i>
  4336. NOT NULL
  4337. </i>
  4338. </td>
  4339. </tr>
  4340. <tr class="tr0">
  4341. <td>
  4342. </td>
  4343. <td>middle_name</td>
  4344. <td>text</td>
  4345. <td><i>
  4346. </i>
  4347. </td>
  4348. </tr>
  4349. <tr class="tr1">
  4350. <td>
  4351. </td>
  4352. <td>last_name</td>
  4353. <td>text</td>
  4354. <td><i>
  4355. NOT NULL
  4356. </i>
  4357. </td>
  4358. </tr>
  4359. <tr class="tr0">
  4360. <td>
  4361. <a href="#public.table.location">location.id</a>
  4362. </td>
  4363. <td>primary_location_id</td>
  4364. <td>integer</td>
  4365. <td><i>
  4366. </i>
  4367. </td>
  4368. </tr>
  4369. </table>
  4370. <!-- Inherits -->
  4371. <!-- Constraint List -->
  4372. <p>&nbsp;</p>
  4373. <table width="100%" cellspacing="0" cellpadding="3">
  4374. <caption>person Constraints</caption>
  4375. <tr>
  4376. <th>Name</th>
  4377. <th>Constraint</th>
  4378. </tr>
  4379. <tr class="tr0">
  4380. <td>person_first_name_check</td>
  4381. <td>CHECK ((first_name ~ &#39;[[:alnum:]_]&#39;::text))</td>
  4382. </tr>
  4383. <tr class="tr1">
  4384. <td>person_last_name_check</td>
  4385. <td>CHECK ((last_name ~ &#39;[[:alnum:]_]&#39;::text))</td>
  4386. </tr>
  4387. </table>
  4388. <!-- Foreign Key Discovery -->
  4389. <p>Tables referencing this one via Foreign Key Constraints:</p>
  4390. <ul>
  4391. <li><a href="#public.table.ap">ap</a></li>
  4392. </ul>
  4393. <ul>
  4394. <li><a href="#public.table.ar">ar</a></li>
  4395. </ul>
  4396. <ul>
  4397. <li><a href="#public.table.audittrail">audittrail</a></li>
  4398. </ul>
  4399. <ul>
  4400. <li><a href="#public.table.gl">gl</a></li>
  4401. </ul>
  4402. <ul>
  4403. <li><a href="#public.table.inventory">inventory</a></li>
  4404. </ul>
  4405. <ul>
  4406. <li><a href="#public.table.jcitems">jcitems</a></li>
  4407. </ul>
  4408. <ul>
  4409. <li><a href="#public.table.oe">oe</a></li>
  4410. </ul>
  4411. <ul>
  4412. <li><a href="#public.table.person-to-company">person_to_company</a></li>
  4413. </ul>
  4414. <ul>
  4415. <li><a href="#public.table.person-to-contact">person_to_contact</a></li>
  4416. </ul>
  4417. <ul>
  4418. <li><a href="#public.table.person-to-entity">person_to_entity</a></li>
  4419. </ul>
  4420. <!-- Indexes -->
  4421. <!-- View Definition -->
  4422. <!-- List off permissions -->
  4423. <p>
  4424. <a href="#index">Index</a> -
  4425. <a href="#public.schema">Schema public</a>
  4426. </p>
  4427. <hr>
  4428. <h2>Table:
  4429. <a name="public.table.person-to-company">person_to_company</a>
  4430. </h2>
  4431. <table width="100%" cellspacing="0" cellpadding="3">
  4432. <caption>person_to_company Structure</caption>
  4433. <tr>
  4434. <th>F-Key</th>
  4435. <th>Name</th>
  4436. <th>Type</th>
  4437. <th>Description</th>
  4438. </tr>
  4439. <tr class="tr0">
  4440. <td>
  4441. <a href="#public.table.location">location.id</a>
  4442. </td>
  4443. <td>location_id</td>
  4444. <td>integer</td>
  4445. <td><i>
  4446. PRIMARY KEY
  4447. </i>
  4448. </td>
  4449. </tr>
  4450. <tr class="tr1">
  4451. <td>
  4452. <a href="#public.table.person">person.id</a>
  4453. </td>
  4454. <td>person_id</td>
  4455. <td>integer</td>
  4456. <td><i>
  4457. PRIMARY KEY
  4458. </i>
  4459. </td>
  4460. </tr>
  4461. </table>
  4462. <!-- Inherits -->
  4463. <!-- Constraint List -->
  4464. <!-- Foreign Key Discovery -->
  4465. <!-- Indexes -->
  4466. <!-- View Definition -->
  4467. <!-- List off permissions -->
  4468. <p>
  4469. <a href="#index">Index</a> -
  4470. <a href="#public.schema">Schema public</a>
  4471. </p>
  4472. <hr>
  4473. <h2>Table:
  4474. <a name="public.table.person-to-contact">person_to_contact</a>
  4475. </h2>
  4476. <p> To keep track of the relationship between multiple contact methods and a single individual </p>
  4477. <table width="100%" cellspacing="0" cellpadding="3">
  4478. <caption>person_to_contact Structure</caption>
  4479. <tr>
  4480. <th>F-Key</th>
  4481. <th>Name</th>
  4482. <th>Type</th>
  4483. <th>Description</th>
  4484. </tr>
  4485. <tr class="tr0">
  4486. <td>
  4487. <a href="#public.table.person">person.id</a>
  4488. </td>
  4489. <td>person_id</td>
  4490. <td>integer</td>
  4491. <td><i>
  4492. PRIMARY KEY
  4493. </i>
  4494. </td>
  4495. </tr>
  4496. <tr class="tr1">
  4497. <td>
  4498. <a href="#public.table.contact-class">contact_class.id</a>
  4499. </td>
  4500. <td>contact_class_id</td>
  4501. <td>integer</td>
  4502. <td><i>
  4503. PRIMARY KEY
  4504. </i>
  4505. </td>
  4506. </tr>
  4507. <tr class="tr0">
  4508. <td>
  4509. </td>
  4510. <td>contact</td>
  4511. <td>text</td>
  4512. <td><i>
  4513. PRIMARY KEY
  4514. </i>
  4515. </td>
  4516. </tr>
  4517. </table>
  4518. <!-- Inherits -->
  4519. <!-- Constraint List -->
  4520. <p>&nbsp;</p>
  4521. <table width="100%" cellspacing="0" cellpadding="3">
  4522. <caption>person_to_contact Constraints</caption>
  4523. <tr>
  4524. <th>Name</th>
  4525. <th>Constraint</th>
  4526. </tr>
  4527. <tr class="tr0">
  4528. <td>person_to_contact_contact_check</td>
  4529. <td>CHECK ((contact ~ &#39;[[:alnum:]_]&#39;::text))</td>
  4530. </tr>
  4531. </table>
  4532. <!-- Foreign Key Discovery -->
  4533. <!-- Indexes -->
  4534. <!-- View Definition -->
  4535. <!-- List off permissions -->
  4536. <p>
  4537. <a href="#index">Index</a> -
  4538. <a href="#public.schema">Schema public</a>
  4539. </p>
  4540. <hr>
  4541. <h2>Table:
  4542. <a name="public.table.person-to-entity">person_to_entity</a>
  4543. </h2>
  4544. <table width="100%" cellspacing="0" cellpadding="3">
  4545. <caption>person_to_entity Structure</caption>
  4546. <tr>
  4547. <th>F-Key</th>
  4548. <th>Name</th>
  4549. <th>Type</th>
  4550. <th>Description</th>
  4551. </tr>
  4552. <tr class="tr0">
  4553. <td>
  4554. <a href="#public.table.person">person.id</a>
  4555. </td>
  4556. <td>person_id</td>
  4557. <td>integer</td>
  4558. <td><i>
  4559. PRIMARY KEY
  4560. </i>
  4561. </td>
  4562. </tr>
  4563. <tr class="tr1">
  4564. <td>
  4565. <a href="#public.table.entity">entity.id</a>
  4566. </td>
  4567. <td>entity_id</td>
  4568. <td>integer</td>
  4569. <td><i>
  4570. PRIMARY KEY
  4571. </i>
  4572. </td>
  4573. </tr>
  4574. <tr class="tr0">
  4575. <td>
  4576. </td>
  4577. <td>related_how</td>
  4578. <td>text</td>
  4579. <td><i>
  4580. </i>
  4581. </td>
  4582. </tr>
  4583. <tr class="tr1">
  4584. <td>
  4585. </td>
  4586. <td>created</td>
  4587. <td>date</td>
  4588. <td><i>
  4589. NOT NULL
  4590. DEFAULT (&#39;now&#39;::text)::date
  4591. </i>
  4592. </td>
  4593. </tr>
  4594. </table>
  4595. <!-- Inherits -->
  4596. <!-- Constraint List -->
  4597. <p>&nbsp;</p>
  4598. <table width="100%" cellspacing="0" cellpadding="3">
  4599. <caption>person_to_entity Constraints</caption>
  4600. <tr>
  4601. <th>Name</th>
  4602. <th>Constraint</th>
  4603. </tr>
  4604. <tr class="tr0">
  4605. <td>person_to_entity_check</td>
  4606. <td>CHECK ((entity_id &lt;&gt; person_id))</td>
  4607. </tr>
  4608. </table>
  4609. <!-- Foreign Key Discovery -->
  4610. <!-- Indexes -->
  4611. <!-- View Definition -->
  4612. <!-- List off permissions -->
  4613. <p>
  4614. <a href="#index">Index</a> -
  4615. <a href="#public.schema">Schema public</a>
  4616. </p>
  4617. <hr>
  4618. <h2>Table:
  4619. <a name="public.table.pricegroup">pricegroup</a>
  4620. </h2>
  4621. <table width="100%" cellspacing="0" cellpadding="3">
  4622. <caption>pricegroup Structure</caption>
  4623. <tr>
  4624. <th>F-Key</th>
  4625. <th>Name</th>
  4626. <th>Type</th>
  4627. <th>Description</th>
  4628. </tr>
  4629. <tr class="tr0">
  4630. <td>
  4631. </td>
  4632. <td>id</td>
  4633. <td>serial</td>
  4634. <td><i>
  4635. PRIMARY KEY
  4636. </i>
  4637. </td>
  4638. </tr>
  4639. <tr class="tr1">
  4640. <td>
  4641. </td>
  4642. <td>pricegroup</td>
  4643. <td>text</td>
  4644. <td><i>
  4645. </i>
  4646. </td>
  4647. </tr>
  4648. </table>
  4649. <!-- Inherits -->
  4650. <!-- Constraint List -->
  4651. <!-- Foreign Key Discovery -->
  4652. <!-- Indexes -->
  4653. pricegroup_id_key id
  4654. pricegroup_pricegroup_key pricegroup
  4655. <!-- View Definition -->
  4656. <!-- List off permissions -->
  4657. <p>
  4658. <a href="#index">Index</a> -
  4659. <a href="#public.schema">Schema public</a>
  4660. </p>
  4661. <hr>
  4662. <h2>Table:
  4663. <a name="public.table.project">project</a>
  4664. </h2>
  4665. <table width="100%" cellspacing="0" cellpadding="3">
  4666. <caption>project Structure</caption>
  4667. <tr>
  4668. <th>F-Key</th>
  4669. <th>Name</th>
  4670. <th>Type</th>
  4671. <th>Description</th>
  4672. </tr>
  4673. <tr class="tr0">
  4674. <td>
  4675. </td>
  4676. <td>id</td>
  4677. <td>serial</td>
  4678. <td><i>
  4679. PRIMARY KEY
  4680. </i>
  4681. </td>
  4682. </tr>
  4683. <tr class="tr1">
  4684. <td>
  4685. </td>
  4686. <td>projectnumber</td>
  4687. <td>text</td>
  4688. <td><i>
  4689. </i>
  4690. </td>
  4691. </tr>
  4692. <tr class="tr0">
  4693. <td>
  4694. </td>
  4695. <td>description</td>
  4696. <td>text</td>
  4697. <td><i>
  4698. </i>
  4699. </td>
  4700. </tr>
  4701. <tr class="tr1">
  4702. <td>
  4703. </td>
  4704. <td>startdate</td>
  4705. <td>date</td>
  4706. <td><i>
  4707. </i>
  4708. </td>
  4709. </tr>
  4710. <tr class="tr0">
  4711. <td>
  4712. </td>
  4713. <td>enddate</td>
  4714. <td>date</td>
  4715. <td><i>
  4716. </i>
  4717. </td>
  4718. </tr>
  4719. <tr class="tr1">
  4720. <td>
  4721. </td>
  4722. <td>parts_id</td>
  4723. <td>integer</td>
  4724. <td><i>
  4725. </i>
  4726. </td>
  4727. </tr>
  4728. <tr class="tr0">
  4729. <td>
  4730. </td>
  4731. <td>production</td>
  4732. <td>numeric</td>
  4733. <td><i>
  4734. </i>
  4735. </td>
  4736. </tr>
  4737. <tr class="tr1">
  4738. <td>
  4739. </td>
  4740. <td>completed</td>
  4741. <td>numeric</td>
  4742. <td><i>
  4743. </i>
  4744. </td>
  4745. </tr>
  4746. <tr class="tr0">
  4747. <td>
  4748. </td>
  4749. <td>customer_id</td>
  4750. <td>integer</td>
  4751. <td><i>
  4752. </i>
  4753. </td>
  4754. </tr>
  4755. </table>
  4756. <!-- Inherits -->
  4757. <!-- Constraint List -->
  4758. <!-- Foreign Key Discovery -->
  4759. <!-- Indexes -->
  4760. project_id_key id
  4761. <!-- View Definition -->
  4762. <!-- List off permissions -->
  4763. <p>
  4764. <a href="#index">Index</a> -
  4765. <a href="#public.schema">Schema public</a>
  4766. </p>
  4767. <hr>
  4768. <h2>Table:
  4769. <a name="public.table.recurring">recurring</a>
  4770. </h2>
  4771. <table width="100%" cellspacing="0" cellpadding="3">
  4772. <caption>recurring Structure</caption>
  4773. <tr>
  4774. <th>F-Key</th>
  4775. <th>Name</th>
  4776. <th>Type</th>
  4777. <th>Description</th>
  4778. </tr>
  4779. <tr class="tr0">
  4780. <td>
  4781. </td>
  4782. <td>id</td>
  4783. <td>integer</td>
  4784. <td><i>
  4785. PRIMARY KEY
  4786. </i>
  4787. </td>
  4788. </tr>
  4789. <tr class="tr1">
  4790. <td>
  4791. </td>
  4792. <td>reference</td>
  4793. <td>text</td>
  4794. <td><i>
  4795. </i>
  4796. </td>
  4797. </tr>
  4798. <tr class="tr0">
  4799. <td>
  4800. </td>
  4801. <td>startdate</td>
  4802. <td>date</td>
  4803. <td><i>
  4804. </i>
  4805. </td>
  4806. </tr>
  4807. <tr class="tr1">
  4808. <td>
  4809. </td>
  4810. <td>nextdate</td>
  4811. <td>date</td>
  4812. <td><i>
  4813. </i>
  4814. </td>
  4815. </tr>
  4816. <tr class="tr0">
  4817. <td>
  4818. </td>
  4819. <td>enddate</td>
  4820. <td>date</td>
  4821. <td><i>
  4822. </i>
  4823. </td>
  4824. </tr>
  4825. <tr class="tr1">
  4826. <td>
  4827. </td>
  4828. <td>repeat</td>
  4829. <td>smallint</td>
  4830. <td><i>
  4831. </i>
  4832. </td>
  4833. </tr>
  4834. <tr class="tr0">
  4835. <td>
  4836. </td>
  4837. <td>unit</td>
  4838. <td>character varying(6)</td>
  4839. <td><i>
  4840. </i>
  4841. </td>
  4842. </tr>
  4843. <tr class="tr1">
  4844. <td>
  4845. </td>
  4846. <td>howmany</td>
  4847. <td>integer</td>
  4848. <td><i>
  4849. </i>
  4850. </td>
  4851. </tr>
  4852. <tr class="tr0">
  4853. <td>
  4854. </td>
  4855. <td>payment</td>
  4856. <td>boolean</td>
  4857. <td><i>
  4858. DEFAULT false
  4859. </i>
  4860. </td>
  4861. </tr>
  4862. </table>
  4863. <!-- Inherits -->
  4864. <!-- Constraint List -->
  4865. <!-- Foreign Key Discovery -->
  4866. <!-- Indexes -->
  4867. <!-- View Definition -->
  4868. <!-- List off permissions -->
  4869. <p>
  4870. <a href="#index">Index</a> -
  4871. <a href="#public.schema">Schema public</a>
  4872. </p>
  4873. <hr>
  4874. <h2>Table:
  4875. <a name="public.table.recurringemail">recurringemail</a>
  4876. </h2>
  4877. <table width="100%" cellspacing="0" cellpadding="3">
  4878. <caption>recurringemail Structure</caption>
  4879. <tr>
  4880. <th>F-Key</th>
  4881. <th>Name</th>
  4882. <th>Type</th>
  4883. <th>Description</th>
  4884. </tr>
  4885. <tr class="tr0">
  4886. <td>
  4887. </td>
  4888. <td>id</td>
  4889. <td>integer</td>
  4890. <td><i>
  4891. PRIMARY KEY
  4892. </i>
  4893. </td>
  4894. </tr>
  4895. <tr class="tr1">
  4896. <td>
  4897. </td>
  4898. <td>formname</td>
  4899. <td>text</td>
  4900. <td><i>
  4901. </i>
  4902. </td>
  4903. </tr>
  4904. <tr class="tr0">
  4905. <td>
  4906. </td>
  4907. <td>format</td>
  4908. <td>text</td>
  4909. <td><i>
  4910. </i>
  4911. </td>
  4912. </tr>
  4913. <tr class="tr1">
  4914. <td>
  4915. </td>
  4916. <td>message</td>
  4917. <td>text</td>
  4918. <td><i>
  4919. </i>
  4920. </td>
  4921. </tr>
  4922. </table>
  4923. <!-- Inherits -->
  4924. <!-- Constraint List -->
  4925. <!-- Foreign Key Discovery -->
  4926. <!-- Indexes -->
  4927. <!-- View Definition -->
  4928. <!-- List off permissions -->
  4929. <p>
  4930. <a href="#index">Index</a> -
  4931. <a href="#public.schema">Schema public</a>
  4932. </p>
  4933. <hr>
  4934. <h2>Table:
  4935. <a name="public.table.recurringprint">recurringprint</a>
  4936. </h2>
  4937. <table width="100%" cellspacing="0" cellpadding="3">
  4938. <caption>recurringprint Structure</caption>
  4939. <tr>
  4940. <th>F-Key</th>
  4941. <th>Name</th>
  4942. <th>Type</th>
  4943. <th>Description</th>
  4944. </tr>
  4945. <tr class="tr0">
  4946. <td>
  4947. </td>
  4948. <td>id</td>
  4949. <td>integer</td>
  4950. <td><i>
  4951. PRIMARY KEY
  4952. </i>
  4953. </td>
  4954. </tr>
  4955. <tr class="tr1">
  4956. <td>
  4957. </td>
  4958. <td>formname</td>
  4959. <td>text</td>
  4960. <td><i>
  4961. </i>
  4962. </td>
  4963. </tr>
  4964. <tr class="tr0">
  4965. <td>
  4966. </td>
  4967. <td>format</td>
  4968. <td>text</td>
  4969. <td><i>
  4970. </i>
  4971. </td>
  4972. </tr>
  4973. <tr class="tr1">
  4974. <td>
  4975. </td>
  4976. <td>printer</td>
  4977. <td>text</td>
  4978. <td><i>
  4979. </i>
  4980. </td>
  4981. </tr>
  4982. </table>
  4983. <!-- Inherits -->
  4984. <!-- Constraint List -->
  4985. <!-- Foreign Key Discovery -->
  4986. <!-- Indexes -->
  4987. <!-- View Definition -->
  4988. <!-- List off permissions -->
  4989. <p>
  4990. <a href="#index">Index</a> -
  4991. <a href="#public.schema">Schema public</a>
  4992. </p>
  4993. <hr>
  4994. <h2>Table:
  4995. <a name="public.table.salutation">salutation</a>
  4996. </h2>
  4997. <table width="100%" cellspacing="0" cellpadding="3">
  4998. <caption>salutation Structure</caption>
  4999. <tr>
  5000. <th>F-Key</th>
  5001. <th>Name</th>
  5002. <th>Type</th>
  5003. <th>Description</th>
  5004. </tr>
  5005. <tr class="tr0">
  5006. <td>
  5007. </td>
  5008. <td>id</td>
  5009. <td>serial</td>
  5010. <td><i>
  5011. UNIQUE
  5012. NOT NULL
  5013. </i>
  5014. </td>
  5015. </tr>
  5016. <tr class="tr1">
  5017. <td>
  5018. </td>
  5019. <td>salutation</td>
  5020. <td>text</td>
  5021. <td><i>
  5022. PRIMARY KEY
  5023. </i>
  5024. </td>
  5025. </tr>
  5026. </table>
  5027. <!-- Inherits -->
  5028. <!-- Constraint List -->
  5029. <!-- Foreign Key Discovery -->
  5030. <p>Tables referencing this one via Foreign Key Constraints:</p>
  5031. <ul>
  5032. <li><a href="#public.table.person">person</a></li>
  5033. </ul>
  5034. <!-- Indexes -->
  5035. <!-- View Definition -->
  5036. <!-- List off permissions -->
  5037. <p>
  5038. <a href="#index">Index</a> -
  5039. <a href="#public.schema">Schema public</a>
  5040. </p>
  5041. <hr>
  5042. <h2>Table:
  5043. <a name="public.table.shipto">shipto</a>
  5044. </h2>
  5045. <table width="100%" cellspacing="0" cellpadding="3">
  5046. <caption>shipto Structure</caption>
  5047. <tr>
  5048. <th>F-Key</th>
  5049. <th>Name</th>
  5050. <th>Type</th>
  5051. <th>Description</th>
  5052. </tr>
  5053. <tr class="tr0">
  5054. <td>
  5055. </td>
  5056. <td>trans_id</td>
  5057. <td>integer</td>
  5058. <td><i>
  5059. </i>
  5060. </td>
  5061. </tr>
  5062. <tr class="tr1">
  5063. <td>
  5064. </td>
  5065. <td>shiptoname</td>
  5066. <td>character varying(64)</td>
  5067. <td><i>
  5068. </i>
  5069. </td>
  5070. </tr>
  5071. <tr class="tr0">
  5072. <td>
  5073. </td>
  5074. <td>shiptoaddress1</td>
  5075. <td>character varying(32)</td>
  5076. <td><i>
  5077. </i>
  5078. </td>
  5079. </tr>
  5080. <tr class="tr1">
  5081. <td>
  5082. </td>
  5083. <td>shiptoaddress2</td>
  5084. <td>character varying(32)</td>
  5085. <td><i>
  5086. </i>
  5087. </td>
  5088. </tr>
  5089. <tr class="tr0">
  5090. <td>
  5091. </td>
  5092. <td>shiptocity</td>
  5093. <td>character varying(32)</td>
  5094. <td><i>
  5095. </i>
  5096. </td>
  5097. </tr>
  5098. <tr class="tr1">
  5099. <td>
  5100. </td>
  5101. <td>shiptostate</td>
  5102. <td>character varying(32)</td>
  5103. <td><i>
  5104. </i>
  5105. </td>
  5106. </tr>
  5107. <tr class="tr0">
  5108. <td>
  5109. </td>
  5110. <td>shiptozipcode</td>
  5111. <td>character varying(10)</td>
  5112. <td><i>
  5113. </i>
  5114. </td>
  5115. </tr>
  5116. <tr class="tr1">
  5117. <td>
  5118. </td>
  5119. <td>shiptocountry</td>
  5120. <td>character varying(32)</td>
  5121. <td><i>
  5122. </i>
  5123. </td>
  5124. </tr>
  5125. <tr class="tr0">
  5126. <td>
  5127. </td>
  5128. <td>shiptocontact</td>
  5129. <td>character varying(64)</td>
  5130. <td><i>
  5131. </i>
  5132. </td>
  5133. </tr>
  5134. <tr class="tr1">
  5135. <td>
  5136. </td>
  5137. <td>shiptophone</td>
  5138. <td>character varying(20)</td>
  5139. <td><i>
  5140. </i>
  5141. </td>
  5142. </tr>
  5143. <tr class="tr0">
  5144. <td>
  5145. </td>
  5146. <td>shiptofax</td>
  5147. <td>character varying(20)</td>
  5148. <td><i>
  5149. </i>
  5150. </td>
  5151. </tr>
  5152. <tr class="tr1">
  5153. <td>
  5154. </td>
  5155. <td>shiptoemail</td>
  5156. <td>text</td>
  5157. <td><i>
  5158. </i>
  5159. </td>
  5160. </tr>
  5161. <tr class="tr0">
  5162. <td>
  5163. </td>
  5164. <td>entry_id</td>
  5165. <td>serial</td>
  5166. <td><i>
  5167. PRIMARY KEY
  5168. </i>
  5169. </td>
  5170. </tr>
  5171. </table>
  5172. <!-- Inherits -->
  5173. <!-- Constraint List -->
  5174. <!-- Foreign Key Discovery -->
  5175. <!-- Indexes -->
  5176. shipto_trans_id_key trans_id
  5177. <!-- View Definition -->
  5178. <!-- List off permissions -->
  5179. <p>
  5180. <a href="#index">Index</a> -
  5181. <a href="#public.schema">Schema public</a>
  5182. </p>
  5183. <hr>
  5184. <h2>Table:
  5185. <a name="public.table.sic">sic</a>
  5186. </h2>
  5187. <table width="100%" cellspacing="0" cellpadding="3">
  5188. <caption>sic Structure</caption>
  5189. <tr>
  5190. <th>F-Key</th>
  5191. <th>Name</th>
  5192. <th>Type</th>
  5193. <th>Description</th>
  5194. </tr>
  5195. <tr class="tr0">
  5196. <td>
  5197. </td>
  5198. <td>code</td>
  5199. <td>character varying(6)</td>
  5200. <td><i>
  5201. PRIMARY KEY
  5202. </i>
  5203. </td>
  5204. </tr>
  5205. <tr class="tr1">
  5206. <td>
  5207. </td>
  5208. <td>sictype</td>
  5209. <td>character(1)</td>
  5210. <td><i>
  5211. </i>
  5212. </td>
  5213. </tr>
  5214. <tr class="tr0">
  5215. <td>
  5216. </td>
  5217. <td>description</td>
  5218. <td>text</td>
  5219. <td><i>
  5220. </i>
  5221. </td>
  5222. </tr>
  5223. </table>
  5224. <!-- Inherits -->
  5225. <!-- Constraint List -->
  5226. <!-- Foreign Key Discovery -->
  5227. <!-- Indexes -->
  5228. <!-- View Definition -->
  5229. <!-- List off permissions -->
  5230. <p>
  5231. <a href="#index">Index</a> -
  5232. <a href="#public.schema">Schema public</a>
  5233. </p>
  5234. <hr>
  5235. <h2>Table:
  5236. <a name="public.table.status">status</a>
  5237. </h2>
  5238. <table width="100%" cellspacing="0" cellpadding="3">
  5239. <caption>status Structure</caption>
  5240. <tr>
  5241. <th>F-Key</th>
  5242. <th>Name</th>
  5243. <th>Type</th>
  5244. <th>Description</th>
  5245. </tr>
  5246. <tr class="tr0">
  5247. <td>
  5248. </td>
  5249. <td>trans_id</td>
  5250. <td>integer</td>
  5251. <td><i>
  5252. PRIMARY KEY
  5253. </i>
  5254. </td>
  5255. </tr>
  5256. <tr class="tr1">
  5257. <td>
  5258. </td>
  5259. <td>formname</td>
  5260. <td>text</td>
  5261. <td><i>
  5262. </i>
  5263. </td>
  5264. </tr>
  5265. <tr class="tr0">
  5266. <td>
  5267. </td>
  5268. <td>printed</td>
  5269. <td>boolean</td>
  5270. <td><i>
  5271. DEFAULT false
  5272. </i>
  5273. </td>
  5274. </tr>
  5275. <tr class="tr1">
  5276. <td>
  5277. </td>
  5278. <td>emailed</td>
  5279. <td>boolean</td>
  5280. <td><i>
  5281. DEFAULT false
  5282. </i>
  5283. </td>
  5284. </tr>
  5285. <tr class="tr0">
  5286. <td>
  5287. </td>
  5288. <td>spoolfile</td>
  5289. <td>text</td>
  5290. <td><i>
  5291. </i>
  5292. </td>
  5293. </tr>
  5294. </table>
  5295. <!-- Inherits -->
  5296. <!-- Constraint List -->
  5297. <!-- Foreign Key Discovery -->
  5298. <!-- Indexes -->
  5299. status_trans_id_key trans_id
  5300. <!-- View Definition -->
  5301. <!-- List off permissions -->
  5302. <p>
  5303. <a href="#index">Index</a> -
  5304. <a href="#public.schema">Schema public</a>
  5305. </p>
  5306. <hr>
  5307. <h2>Table:
  5308. <a name="public.table.tax">tax</a>
  5309. </h2>
  5310. <table width="100%" cellspacing="0" cellpadding="3">
  5311. <caption>tax Structure</caption>
  5312. <tr>
  5313. <th>F-Key</th>
  5314. <th>Name</th>
  5315. <th>Type</th>
  5316. <th>Description</th>
  5317. </tr>
  5318. <tr class="tr0">
  5319. <td>
  5320. <a href="#public.table.chart">chart.id</a>
  5321. </td>
  5322. <td>chart_id</td>
  5323. <td>integer</td>
  5324. <td><i>
  5325. PRIMARY KEY
  5326. </i>
  5327. </td>
  5328. </tr>
  5329. <tr class="tr1">
  5330. <td>
  5331. </td>
  5332. <td>rate</td>
  5333. <td>numeric</td>
  5334. <td><i>
  5335. </i>
  5336. </td>
  5337. </tr>
  5338. <tr class="tr0">
  5339. <td>
  5340. </td>
  5341. <td>taxnumber</td>
  5342. <td>text</td>
  5343. <td><i>
  5344. </i>
  5345. </td>
  5346. </tr>
  5347. <tr class="tr1">
  5348. <td>
  5349. </td>
  5350. <td>validto</td>
  5351. <td>date</td>
  5352. <td><i>
  5353. </i>
  5354. </td>
  5355. </tr>
  5356. <tr class="tr0">
  5357. <td>
  5358. </td>
  5359. <td>pass</td>
  5360. <td>integer</td>
  5361. <td><i>
  5362. NOT NULL
  5363. </i>
  5364. </td>
  5365. </tr>
  5366. <tr class="tr1">
  5367. <td>
  5368. <a href="#public.table.taxmodule">taxmodule.taxmodule_id</a>
  5369. </td>
  5370. <td>taxmodule_id</td>
  5371. <td>integer</td>
  5372. <td><i>
  5373. NOT NULL
  5374. DEFAULT 1
  5375. </i>
  5376. </td>
  5377. </tr>
  5378. </table>
  5379. <!-- Inherits -->
  5380. <!-- Constraint List -->
  5381. <!-- Foreign Key Discovery -->
  5382. <!-- Indexes -->
  5383. <!-- View Definition -->
  5384. <!-- List off permissions -->
  5385. <p>
  5386. <a href="#index">Index</a> -
  5387. <a href="#public.schema">Schema public</a>
  5388. </p>
  5389. <hr>
  5390. <h2>Table:
  5391. <a name="public.table.taxcategory">taxcategory</a>
  5392. </h2>
  5393. <table width="100%" cellspacing="0" cellpadding="3">
  5394. <caption>taxcategory Structure</caption>
  5395. <tr>
  5396. <th>F-Key</th>
  5397. <th>Name</th>
  5398. <th>Type</th>
  5399. <th>Description</th>
  5400. </tr>
  5401. <tr class="tr0">
  5402. <td>
  5403. </td>
  5404. <td>taxcategory_id</td>
  5405. <td>serial</td>
  5406. <td><i>
  5407. PRIMARY KEY
  5408. </i>
  5409. </td>
  5410. </tr>
  5411. <tr class="tr1">
  5412. <td>
  5413. </td>
  5414. <td>taxcategoryname</td>
  5415. <td>text</td>
  5416. <td><i>
  5417. NOT NULL
  5418. </i>
  5419. </td>
  5420. </tr>
  5421. <tr class="tr0">
  5422. <td>
  5423. <a href="#public.table.taxmodule">taxmodule.taxmodule_id</a>
  5424. </td>
  5425. <td>taxmodule_id</td>
  5426. <td>integer</td>
  5427. <td><i>
  5428. NOT NULL
  5429. </i>
  5430. </td>
  5431. </tr>
  5432. </table>
  5433. <!-- Inherits -->
  5434. <!-- Constraint List -->
  5435. <!-- Foreign Key Discovery -->
  5436. <p>Tables referencing this one via Foreign Key Constraints:</p>
  5437. <ul>
  5438. <li><a href="#public.table.partstax">partstax</a></li>
  5439. </ul>
  5440. <!-- Indexes -->
  5441. <!-- View Definition -->
  5442. <!-- List off permissions -->
  5443. <p>
  5444. <a href="#index">Index</a> -
  5445. <a href="#public.schema">Schema public</a>
  5446. </p>
  5447. <hr>
  5448. <h2>Table:
  5449. <a name="public.table.taxmodule">taxmodule</a>
  5450. </h2>
  5451. <table width="100%" cellspacing="0" cellpadding="3">
  5452. <caption>taxmodule Structure</caption>
  5453. <tr>
  5454. <th>F-Key</th>
  5455. <th>Name</th>
  5456. <th>Type</th>
  5457. <th>Description</th>
  5458. </tr>
  5459. <tr class="tr0">
  5460. <td>
  5461. </td>
  5462. <td>taxmodule_id</td>
  5463. <td>serial</td>
  5464. <td><i>
  5465. PRIMARY KEY
  5466. </i>
  5467. </td>
  5468. </tr>
  5469. <tr class="tr1">
  5470. <td>
  5471. </td>
  5472. <td>taxmodulename</td>
  5473. <td>text</td>
  5474. <td><i>
  5475. NOT NULL
  5476. </i>
  5477. </td>
  5478. </tr>
  5479. </table>
  5480. <!-- Inherits -->
  5481. <!-- Constraint List -->
  5482. <!-- Foreign Key Discovery -->
  5483. <p>Tables referencing this one via Foreign Key Constraints:</p>
  5484. <ul>
  5485. <li><a href="#public.table.tax">tax</a></li>
  5486. </ul>
  5487. <ul>
  5488. <li><a href="#public.table.taxcategory">taxcategory</a></li>
  5489. </ul>
  5490. <!-- Indexes -->
  5491. <!-- View Definition -->
  5492. <!-- List off permissions -->
  5493. <p>
  5494. <a href="#index">Index</a> -
  5495. <a href="#public.schema">Schema public</a>
  5496. </p>
  5497. <hr>
  5498. <h2>Table:
  5499. <a name="public.table.transactions">transactions</a>
  5500. </h2>
  5501. <table width="100%" cellspacing="0" cellpadding="3">
  5502. <caption>transactions Structure</caption>
  5503. <tr>
  5504. <th>F-Key</th>
  5505. <th>Name</th>
  5506. <th>Type</th>
  5507. <th>Description</th>
  5508. </tr>
  5509. <tr class="tr0">
  5510. <td>
  5511. </td>
  5512. <td>id</td>
  5513. <td>integer</td>
  5514. <td><i>
  5515. PRIMARY KEY
  5516. </i>
  5517. </td>
  5518. </tr>
  5519. <tr class="tr1">
  5520. <td>
  5521. </td>
  5522. <td>table_name</td>
  5523. <td>text</td>
  5524. <td><i>
  5525. </i>
  5526. </td>
  5527. </tr>
  5528. </table>
  5529. <!-- Inherits -->
  5530. <!-- Constraint List -->
  5531. <!-- Foreign Key Discovery -->
  5532. <!-- Indexes -->
  5533. <!-- View Definition -->
  5534. <!-- List off permissions -->
  5535. <p>
  5536. <a href="#index">Index</a> -
  5537. <a href="#public.schema">Schema public</a>
  5538. </p>
  5539. <hr>
  5540. <h2>Table:
  5541. <a name="public.table.translation">translation</a>
  5542. </h2>
  5543. <table width="100%" cellspacing="0" cellpadding="3">
  5544. <caption>translation Structure</caption>
  5545. <tr>
  5546. <th>F-Key</th>
  5547. <th>Name</th>
  5548. <th>Type</th>
  5549. <th>Description</th>
  5550. </tr>
  5551. <tr class="tr0">
  5552. <td>
  5553. </td>
  5554. <td>trans_id</td>
  5555. <td>integer</td>
  5556. <td><i>
  5557. PRIMARY KEY
  5558. </i>
  5559. </td>
  5560. </tr>
  5561. <tr class="tr1">
  5562. <td>
  5563. </td>
  5564. <td>language_code</td>
  5565. <td>character varying(6)</td>
  5566. <td><i>
  5567. PRIMARY KEY
  5568. </i>
  5569. </td>
  5570. </tr>
  5571. <tr class="tr0">
  5572. <td>
  5573. </td>
  5574. <td>description</td>
  5575. <td>text</td>
  5576. <td><i>
  5577. </i>
  5578. </td>
  5579. </tr>
  5580. </table>
  5581. <!-- Inherits -->
  5582. <!-- Constraint List -->
  5583. <!-- Foreign Key Discovery -->
  5584. <!-- Indexes -->
  5585. translation_trans_id_key trans_id
  5586. <!-- View Definition -->
  5587. <!-- List off permissions -->
  5588. <p>
  5589. <a href="#index">Index</a> -
  5590. <a href="#public.schema">Schema public</a>
  5591. </p>
  5592. <hr>
  5593. <h2>Table:
  5594. <a name="public.table.vendor">vendor</a>
  5595. </h2>
  5596. <p> Now a meta data table </p>
  5597. <table width="100%" cellspacing="0" cellpadding="3">
  5598. <caption>vendor Structure</caption>
  5599. <tr>
  5600. <th>F-Key</th>
  5601. <th>Name</th>
  5602. <th>Type</th>
  5603. <th>Description</th>
  5604. </tr>
  5605. <tr class="tr0">
  5606. <td>
  5607. </td>
  5608. <td>id</td>
  5609. <td>serial</td>
  5610. <td><i>
  5611. PRIMARY KEY
  5612. </i>
  5613. </td>
  5614. </tr>
  5615. <tr class="tr1">
  5616. <td>
  5617. <a href="#public.table.entity">entity.id</a>
  5618. </td>
  5619. <td>entity_id</td>
  5620. <td>integer</td>
  5621. <td><i>
  5622. NOT NULL
  5623. </i>
  5624. </td>
  5625. </tr>
  5626. <tr class="tr0">
  5627. <td>
  5628. </td>
  5629. <td>terms</td>
  5630. <td>smallint</td>
  5631. <td><i>
  5632. </i>
  5633. </td>
  5634. </tr>
  5635. <tr class="tr1">
  5636. <td>
  5637. </td>
  5638. <td>taxincluded</td>
  5639. <td>boolean</td>
  5640. <td><i>
  5641. DEFAULT false
  5642. </i>
  5643. </td>
  5644. </tr>
  5645. <tr class="tr0">
  5646. <td>
  5647. </td>
  5648. <td>vendornumber</td>
  5649. <td>character varying(32)</td>
  5650. <td><i>
  5651. </i>
  5652. </td>
  5653. </tr>
  5654. <tr class="tr1">
  5655. <td>
  5656. </td>
  5657. <td>cc</td>
  5658. <td>text</td>
  5659. <td><i>
  5660. </i>
  5661. </td>
  5662. </tr>
  5663. <tr class="tr0">
  5664. <td>
  5665. </td>
  5666. <td>bcc</td>
  5667. <td>text</td>
  5668. <td><i>
  5669. </i>
  5670. </td>
  5671. </tr>
  5672. <tr class="tr1">
  5673. <td>
  5674. </td>
  5675. <td>gifi_accno</td>
  5676. <td>character varying(30)</td>
  5677. <td><i>
  5678. </i>
  5679. </td>
  5680. </tr>
  5681. <tr class="tr0">
  5682. <td>
  5683. </td>
  5684. <td>business_id</td>
  5685. <td>integer</td>
  5686. <td><i>
  5687. </i>
  5688. </td>
  5689. </tr>
  5690. <tr class="tr1">
  5691. <td>
  5692. </td>
  5693. <td>taxnumber</td>
  5694. <td>character varying(32)</td>
  5695. <td><i>
  5696. </i>
  5697. </td>
  5698. </tr>
  5699. <tr class="tr0">
  5700. <td>
  5701. </td>
  5702. <td>sic_code</td>
  5703. <td>character varying(6)</td>
  5704. <td><i>
  5705. </i>
  5706. </td>
  5707. </tr>
  5708. <tr class="tr1">
  5709. <td>
  5710. </td>
  5711. <td>discount</td>
  5712. <td>numeric</td>
  5713. <td><i>
  5714. </i>
  5715. </td>
  5716. </tr>
  5717. <tr class="tr0">
  5718. <td>
  5719. </td>
  5720. <td>creditlimit</td>
  5721. <td>numeric</td>
  5722. <td><i>
  5723. </i>
  5724. </td>
  5725. </tr>
  5726. <tr class="tr1">
  5727. <td>
  5728. </td>
  5729. <td>iban</td>
  5730. <td>character varying(34)</td>
  5731. <td><i>
  5732. </i>
  5733. </td>
  5734. </tr>
  5735. <tr class="tr0">
  5736. <td>
  5737. </td>
  5738. <td>bic</td>
  5739. <td>character varying(11)</td>
  5740. <td><i>
  5741. </i>
  5742. </td>
  5743. </tr>
  5744. <tr class="tr1">
  5745. <td>
  5746. </td>
  5747. <td>language_code</td>
  5748. <td>character varying(6)</td>
  5749. <td><i>
  5750. </i>
  5751. </td>
  5752. </tr>
  5753. <tr class="tr0">
  5754. <td>
  5755. </td>
  5756. <td>pricegroup_id</td>
  5757. <td>integer</td>
  5758. <td><i>
  5759. </i>
  5760. </td>
  5761. </tr>
  5762. <tr class="tr1">
  5763. <td>
  5764. </td>
  5765. <td>curr</td>
  5766. <td>character(3)</td>
  5767. <td><i>
  5768. </i>
  5769. </td>
  5770. </tr>
  5771. <tr class="tr0">
  5772. <td>
  5773. </td>
  5774. <td>startdate</td>
  5775. <td>date</td>
  5776. <td><i>
  5777. </i>
  5778. </td>
  5779. </tr>
  5780. <tr class="tr1">
  5781. <td>
  5782. </td>
  5783. <td>enddate</td>
  5784. <td>date</td>
  5785. <td><i>
  5786. </i>
  5787. </td>
  5788. </tr>
  5789. </table>
  5790. <!-- Inherits -->
  5791. <!-- Constraint List -->
  5792. <!-- Foreign Key Discovery -->
  5793. <!-- Indexes -->
  5794. vendor_id_key id
  5795. vendor_vendornumber_key vendornumber
  5796. <!-- View Definition -->
  5797. <!-- List off permissions -->
  5798. <p>
  5799. <a href="#index">Index</a> -
  5800. <a href="#public.schema">Schema public</a>
  5801. </p>
  5802. <hr>
  5803. <h2>Table:
  5804. <a name="public.table.vendortax">vendortax</a>
  5805. </h2>
  5806. <table width="100%" cellspacing="0" cellpadding="3">
  5807. <caption>vendortax Structure</caption>
  5808. <tr>
  5809. <th>F-Key</th>
  5810. <th>Name</th>
  5811. <th>Type</th>
  5812. <th>Description</th>
  5813. </tr>
  5814. <tr class="tr0">
  5815. <td>
  5816. </td>
  5817. <td>vendor_id</td>
  5818. <td>integer</td>
  5819. <td><i>
  5820. PRIMARY KEY
  5821. </i>
  5822. </td>
  5823. </tr>
  5824. <tr class="tr1">
  5825. <td>
  5826. </td>
  5827. <td>chart_id</td>
  5828. <td>integer</td>
  5829. <td><i>
  5830. PRIMARY KEY
  5831. </i>
  5832. </td>
  5833. </tr>
  5834. </table>
  5835. <!-- Inherits -->
  5836. <!-- Constraint List -->
  5837. <!-- Foreign Key Discovery -->
  5838. <!-- Indexes -->
  5839. <!-- View Definition -->
  5840. <!-- List off permissions -->
  5841. <p>
  5842. <a href="#index">Index</a> -
  5843. <a href="#public.schema">Schema public</a>
  5844. </p>
  5845. <hr>
  5846. <h2>Table:
  5847. <a name="public.table.warehouse">warehouse</a>
  5848. </h2>
  5849. <table width="100%" cellspacing="0" cellpadding="3">
  5850. <caption>warehouse Structure</caption>
  5851. <tr>
  5852. <th>F-Key</th>
  5853. <th>Name</th>
  5854. <th>Type</th>
  5855. <th>Description</th>
  5856. </tr>
  5857. <tr class="tr0">
  5858. <td>
  5859. </td>
  5860. <td>id</td>
  5861. <td>serial</td>
  5862. <td><i>
  5863. PRIMARY KEY
  5864. </i>
  5865. </td>
  5866. </tr>
  5867. <tr class="tr1">
  5868. <td>
  5869. </td>
  5870. <td>description</td>
  5871. <td>text</td>
  5872. <td><i>
  5873. </i>
  5874. </td>
  5875. </tr>
  5876. </table>
  5877. <!-- Inherits -->
  5878. <!-- Constraint List -->
  5879. <!-- Foreign Key Discovery -->
  5880. <!-- Indexes -->
  5881. <!-- View Definition -->
  5882. <!-- List off permissions -->
  5883. <p>
  5884. <a href="#index">Index</a> -
  5885. <a href="#public.schema">Schema public</a>
  5886. </p>
  5887. <hr>
  5888. <h2>Table:
  5889. <a name="public.table.yearend">yearend</a>
  5890. </h2>
  5891. <table width="100%" cellspacing="0" cellpadding="3">
  5892. <caption>yearend Structure</caption>
  5893. <tr>
  5894. <th>F-Key</th>
  5895. <th>Name</th>
  5896. <th>Type</th>
  5897. <th>Description</th>
  5898. </tr>
  5899. <tr class="tr0">
  5900. <td>
  5901. </td>
  5902. <td>trans_id</td>
  5903. <td>integer</td>
  5904. <td><i>
  5905. PRIMARY KEY
  5906. </i>
  5907. </td>
  5908. </tr>
  5909. <tr class="tr1">
  5910. <td>
  5911. </td>
  5912. <td>transdate</td>
  5913. <td>date</td>
  5914. <td><i>
  5915. </i>
  5916. </td>
  5917. </tr>
  5918. </table>
  5919. <!-- Inherits -->
  5920. <!-- Constraint List -->
  5921. <!-- Foreign Key Discovery -->
  5922. <!-- Indexes -->
  5923. <!-- View Definition -->
  5924. <!-- List off permissions -->
  5925. <p>
  5926. <a href="#index">Index</a> -
  5927. <a href="#public.schema">Schema public</a>
  5928. </p>
  5929. <!-- We've gone through the table structure, now lets take a look at user functions -->
  5930. <hr>
  5931. <h2>Function:
  5932. <a href="#public.schema"><a name="public.function.add-custom-field-character-varying-character-varying-character-varying">add_custom_field( character varying, character varying, character varying )</a>
  5933. </h2>
  5934. <h3>Returns: boolean</h3>
  5935. <h3>Language: PLPGSQL</h3>
  5936. <pre>
  5937. DECLARE
  5938. table_name ALIAS FOR $1;
  5939. new_field_name ALIAS FOR $2;
  5940. field_datatype ALIAS FOR $3;
  5941. BEGIN
  5942. EXECUTE &#39;SELECT TABLE_ID FROM custom_table_catalog
  5943. WHERE extends = &#39;&#39;&#39; || table_name || &#39;&#39;&#39; &#39;;
  5944. IF NOT FOUND THEN
  5945. BEGIN
  5946. INSERT INTO custom_table_catalog (extends)
  5947. VALUES (table_name);
  5948. EXECUTE &#39;CREATE TABLE custom_&#39;||table_name ||
  5949. &#39; (row_id INT PRIMARY KEY)&#39;;
  5950. EXCEPTION WHEN duplicate_table THEN
  5951. -- do nothing
  5952. END;
  5953. END IF;
  5954. EXECUTE &#39;INSERT INTO custom_field_catalog (field_name, table_id)
  5955. VALUES ( &#39;&#39;&#39; || new_field_name ||&#39;&#39;&#39;, (SELECT table_id FROM custom_table_catalog
  5956. WHERE extends = &#39;&#39;&#39;|| table_name || &#39;&#39;&#39;))&#39;;
  5957. EXECUTE &#39;ALTER TABLE custom_&#39;||table_name || &#39; ADD COLUMN &#39;
  5958. || new_field_name || &#39; &#39; || field_datatype;
  5959. RETURN TRUE;
  5960. END;
  5961. </pre>
  5962. <hr>
  5963. <h2>Function:
  5964. <a href="#public.schema"><a name="public.function.avgcost-integer">avgcost( integer )</a>
  5965. </h2>
  5966. <h3>Returns: double precision</h3>
  5967. <h3>Language: PLPGSQL</h3>
  5968. <pre>
  5969. DECLARE
  5970. v_cost float;
  5971. v_qty float;
  5972. v_parts_id alias for $1;
  5973. BEGIN
  5974. SELECT INTO v_cost, v_qty SUM(i.sellprice * i.qty), SUM(i.qty)
  5975. FROM invoice i
  5976. JOIN ap a ON (a.id = i.trans_id)
  5977. WHERE i.parts_id = v_parts_id;
  5978. IF v_cost IS NULL THEN
  5979. v_cost := 0;
  5980. END IF;
  5981. IF NOT v_qty IS NULL THEN
  5982. IF v_qty = 0 THEN
  5983. v_cost := 0;
  5984. ELSE
  5985. v_cost := v_cost/v_qty;
  5986. END IF;
  5987. END IF;
  5988. RETURN v_cost;
  5989. END;
  5990. </pre>
  5991. <hr>
  5992. <h2>Function:
  5993. <a href="#public.schema"><a name="public.function.check-department">check_department( )</a>
  5994. </h2>
  5995. <h3>Returns: &quot;trigger&quot;</h3>
  5996. <h3>Language: PLPGSQL</h3>
  5997. <pre>
  5998. declare
  5999. dpt_id int;
  6000. begin
  6001. if new.department_id = 0 then
  6002. delete from dpt_trans where trans_id = new.id;
  6003. return NULL;
  6004. end if;
  6005. select into dpt_id trans_id from dpt_trans where trans_id = new.id;
  6006. if dpt_id &gt; 0 then
  6007. update dpt_trans set department_id = new.department_id where trans_id = dpt_id;
  6008. else
  6009. insert into dpt_trans (trans_id, department_id) values (new.id, new.department_id);
  6010. end if;
  6011. return NULL;
  6012. end;
  6013. </pre>
  6014. <hr>
  6015. <h2>Function:
  6016. <a href="#public.schema"><a name="public.function.check-inventory">check_inventory( )</a>
  6017. </h2>
  6018. <h3>Returns: &quot;trigger&quot;</h3>
  6019. <h3>Language: PLPGSQL</h3>
  6020. <pre>
  6021. declare
  6022. itemid int;
  6023. row_data inventory%rowtype;
  6024. begin
  6025. if not old.quotation then
  6026. for row_data in select * from inventory where trans_id = old.id loop
  6027. select into itemid id from orderitems where trans_id = old.id and id = row_data.orderitems_id;
  6028. if itemid is null then
  6029. delete from inventory where trans_id = old.id and orderitems_id = row_data.orderitems_id;
  6030. end if;
  6031. end loop;
  6032. end if;
  6033. return old;
  6034. end;
  6035. </pre>
  6036. <hr>
  6037. <h2>Function:
  6038. <a href="#public.schema"><a name="public.function.del-customer">del_customer( )</a>
  6039. </h2>
  6040. <h3>Returns: &quot;trigger&quot;</h3>
  6041. <h3>Language: PLPGSQL</h3>
  6042. <pre>
  6043. begin
  6044. delete from shipto where trans_id = old.id;
  6045. delete from customertax where customer_id = old.id;
  6046. delete from partscustomer where customer_id = old.id;
  6047. return NULL;
  6048. end;
  6049. </pre>
  6050. <hr>
  6051. <h2>Function:
  6052. <a href="#public.schema"><a name="public.function.del-department">del_department( )</a>
  6053. </h2>
  6054. <h3>Returns: &quot;trigger&quot;</h3>
  6055. <h3>Language: PLPGSQL</h3>
  6056. <pre>
  6057. begin
  6058. delete from dpt_trans where trans_id = old.id;
  6059. return NULL;
  6060. end;
  6061. </pre>
  6062. <hr>
  6063. <h2>Function:
  6064. <a href="#public.schema"><a name="public.function.del-exchangerate">del_exchangerate( )</a>
  6065. </h2>
  6066. <h3>Returns: &quot;trigger&quot;</h3>
  6067. <h3>Language: PLPGSQL</h3>
  6068. <pre>
  6069. declare
  6070. t_transdate date;
  6071. t_curr char(3);
  6072. t_id int;
  6073. d_curr text;
  6074. begin
  6075. select into d_curr substr(value,1,3) from defaults where setting_key = &#39;curr&#39;;
  6076. if TG_RELNAME = &#39;ar&#39; then
  6077. select into t_curr, t_transdate curr, transdate from ar where id = old.id;
  6078. end if;
  6079. if TG_RELNAME = &#39;ap&#39; then
  6080. select into t_curr, t_transdate curr, transdate from ap where id = old.id;
  6081. end if;
  6082. if TG_RELNAME = &#39;oe&#39; then
  6083. select into t_curr, t_transdate curr, transdate from oe where id = old.id;
  6084. end if;
  6085. if d_curr != t_curr then
  6086. select into t_id a.id from acc_trans ac
  6087. join ar a on (a.id = ac.trans_id)
  6088. where a.curr = t_curr
  6089. and ac.transdate = t_transdate
  6090. except select a.id from ar a where a.id = old.id
  6091. union
  6092. select a.id from acc_trans ac
  6093. join ap a on (a.id = ac.trans_id)
  6094. where a.curr = t_curr
  6095. and ac.transdate = t_transdate
  6096. except select a.id from ap a where a.id = old.id
  6097. union
  6098. select o.id from oe o
  6099. where o.curr = t_curr
  6100. and o.transdate = t_transdate
  6101. except select o.id from oe o where o.id = old.id;
  6102. if not found then
  6103. delete from exchangerate where curr = t_curr and transdate = t_transdate;
  6104. end if;
  6105. end if;
  6106. return old;
  6107. end;
  6108. </pre>
  6109. <hr>
  6110. <h2>Function:
  6111. <a href="#public.schema"><a name="public.function.del-recurring">del_recurring( )</a>
  6112. </h2>
  6113. <h3>Returns: &quot;trigger&quot;</h3>
  6114. <h3>Language: PLPGSQL</h3>
  6115. <pre>
  6116. BEGIN
  6117. DELETE FROM recurring WHERE id = old.id;
  6118. DELETE FROM recurringemail WHERE id = old.id;
  6119. DELETE FROM recurringprint WHERE id = old.id;
  6120. RETURN NULL;
  6121. END;
  6122. </pre>
  6123. <hr>
  6124. <h2>Function:
  6125. <a href="#public.schema"><a name="public.function.del-vendor">del_vendor( )</a>
  6126. </h2>
  6127. <h3>Returns: &quot;trigger&quot;</h3>
  6128. <h3>Language: PLPGSQL</h3>
  6129. <pre>
  6130. begin
  6131. delete from shipto where trans_id = old.id;
  6132. delete from vendortax where vendor_id = old.id;
  6133. delete from partsvendor where vendor_id = old.id;
  6134. return NULL;
  6135. end;
  6136. </pre>
  6137. <hr>
  6138. <h2>Function:
  6139. <a href="#public.schema"><a name="public.function.del-yearend">del_yearend( )</a>
  6140. </h2>
  6141. <h3>Returns: &quot;trigger&quot;</h3>
  6142. <h3>Language: PLPGSQL</h3>
  6143. <pre>
  6144. begin
  6145. delete from yearend where trans_id = old.id;
  6146. return NULL;
  6147. end;
  6148. </pre>
  6149. <hr>
  6150. <h2>Function:
  6151. <a href="#public.schema"><a name="public.function.drop-custom-field-character-varying-character-varying">drop_custom_field( character varying, character varying )</a>
  6152. </h2>
  6153. <h3>Returns: boolean</h3>
  6154. <h3>Language: PLPGSQL</h3>
  6155. <pre>
  6156. DECLARE
  6157. table_name ALIAS FOR $1;
  6158. custom_field_name ALIAS FOR $2;
  6159. BEGIN
  6160. DELETE FROM custom_field_catalog
  6161. WHERE field_name = custom_field_name AND
  6162. table_id = (SELECT table_id FROM custom_table_catalog
  6163. WHERE extends = table_name);
  6164. EXECUTE &#39;ALTER TABLE custom_&#39; || table_name ||
  6165. &#39; DROP COLUMN &#39; || custom_field_name;
  6166. RETURN TRUE;
  6167. END;
  6168. </pre>
  6169. <hr>
  6170. <h2>Function:
  6171. <a href="#public.schema"><a name="public.function.lastcost-integer">lastcost( integer )</a>
  6172. </h2>
  6173. <h3>Returns: double precision</h3>
  6174. <h3>Language: PLPGSQL</h3>
  6175. <pre>
  6176. DECLARE
  6177. v_cost float;
  6178. v_parts_id alias for $1;
  6179. BEGIN
  6180. SELECT INTO v_cost sellprice FROM invoice i
  6181. JOIN ap a ON (a.id = i.trans_id)
  6182. WHERE i.parts_id = v_parts_id
  6183. ORDER BY a.transdate desc, a.id desc
  6184. LIMIT 1;
  6185. IF v_cost IS NULL THEN
  6186. v_cost := 0;
  6187. END IF;
  6188. RETURN v_cost;
  6189. END;
  6190. </pre>
  6191. <hr>
  6192. <h2>Function:
  6193. <a href="#public.schema"><a name="public.function.trigger-parts-short">trigger_parts_short( )</a>
  6194. </h2>
  6195. <h3>Returns: &quot;trigger&quot;</h3>
  6196. <h3>Language: PLPGSQL</h3>
  6197. <pre>
  6198. BEGIN
  6199. IF NEW.onhand &gt;= NEW.rop THEN
  6200. NOTIFY parts_short;
  6201. END IF;
  6202. RETURN NEW;
  6203. END;
  6204. </pre>
  6205. <hr>
  6206. <h2>Function:
  6207. <a href="#public.schema"><a name="public.function.update-user-integer-text">update_user( integer, text )</a>
  6208. </h2>
  6209. <h3>Returns: integer</h3>
  6210. <h3>Language: SQL</h3>
  6211. <p> Takes int4 which is users.id and text which is username. Will update username based on id. Username is unique </p>
  6212. <pre>
  6213. UPDATE users SET username = &#39;$2&#39; WHERE id = $1;
  6214. SELECT 1;
  6215. </pre>
  6216. <p class="w3ref">Generated by <a href="http://www.rbt.ca/autodoc/">PostgreSQL Autodoc</a></p>
  6217. <p class="w3ref"><a href="http://validator.w3.org/check/referer">W3C HTML 4.01 Strict</a></p>
  6218. </body></html>